/** * 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(); }
/** * return the path to karma image * @param user CUser object */ public static function getPointsImage($user) { $CKarma = new CKarma(); return $CKarma->getKarmaImage($user); }
/** * return the path to karma image * @param user CUser object */ function getPointsImage($user) { return CKarma::getKarmaImage($user); }