/** * Returns user's account by user id * * @param int $userId * @return RM_Points_Account */ public function getAccount($userId) { if (isNull($obUser = M('User')->loadUserById($userId))) { throw new RM_Base_Exception_Internal("Unable to load user by id: `{$userId}'"); } return $this->_mapper->loadAccountByUserOrCreate($obUser); }
/** * Enter description here... * * @param RM_User_Object $obUser * @return RM_Points_Account */ public function loadAccountByUserOrCreate(RM_User_Object $obUser) { return $this->_mapper->loadAccountByUserOrCreate($obUser); }