* @license PHP License * @package WB * @subpackage base */ WBClass::load('WBEvent_Handler'); /** * Event_Handler_User * * Stop event processing in case * * @version 1.1.0 * @package WB * @subpackage base */ class WBEvent_Handler_User extends WBEvent_Handler { /** * Handler config * @var array */ protected $config = array( 'group' => '', ); /** * User Object * @var WBUser */ protected $user; /** * Load user by id * * @param WBEvent $e */ protected function loadUser(WBEvent $e) { $uid = $e->get('uid', 0); if (empty($uid)) { return false; } // create user object only once if (empty($this->user)) { $this->user = WBClass::create('WBUser'); } return $this->user->load($uid); } }