Exemplo n.º 1
0
 /**
  * add points to user based on the action.
  */
 function assignPoint($action, $userId = null)
 {
     //get the rule points
     $user = CFactory::getUser($userId);
     $points = CKarma::getActionPoint($action, $user->gid);
     $points += $user->getKarmaPoint();
     $user->_points = $points;
     $user->save();
 }
Exemplo n.º 2
0
 /**
  * return the path to karma image
  * @param	user	CUser object
  */
 public static function getPointsImage($user)
 {
     $CKarma = new CKarma();
     return $CKarma->getKarmaImage($user);
 }
Exemplo n.º 3
0
 /**
  * return the path to karma image
  * @param	user	CUser object	 
  */
 function getPointsImage($user)
 {
     return CKarma::getKarmaImage($user);
 }