getUser() public method

public getUser ( ) : User
return User
 public static function onUserRegistration(UserRegistrationEvent $event)
 {
     $user = $event->getUser();
     $token = $event->getToken();
     $password = $event->getPassword();
     Yii::app()->mailMessage->raiseMailEvent('USER_REGISTRATION', ['{user_email}' => $user->email, '{password}' => $password, '{activate_url}' => Yii::app()->createAbsoluteUrl('/user/account/activate', ['token' => $token->token]), '{site_name}' => Yii::app()->getModule('yupe')->siteName, '{host_info}' => Yii::app()->request->hostInfo]);
 }
 public static function onUserRegistration(UserRegistrationEvent $event)
 {
     $link = Yii::app()->createAbsoluteUrl('/user/account/activate', array('token' => $event->getToken()->token));
     $data = array_merge(self::commonData($event->getUser()), array('{link}' => CHtml::link($link, $link)));
     try {
         Yii::app()->mailMessage->raiseMailEvent('onUserRegistration', $data);
     } catch (Exception $e) {
         Yii::log($e->__toString(), \CLogger::LEVEL_ERROR, 'mail');
     }
 }
 /**
  * @param UserRegistrationEvent $event
  */
 public static function onUserRegistrationNeedActivation(UserRegistrationEvent $event)
 {
     Yii::app()->notify->send($event->getUser(), Yii::t('UserModule.user', 'Registration on {site}', ['{site}' => Yii::app()->getModule('yupe')->siteName]), '//user/email/needAccountActivationEmail', ['token' => $event->getToken(), 'user' => $event->getUser(), 'event' => $event]);
 }