public function run()
    {
        $user = $this->getUser(User::STATUS_REGISTERED);
        if (empty($user)) {
            return [
                true,
                Yii::t('podium/flash', 'Sorry! We can not find the account with that user name or e-mail address.'),
                false
            ];
        }
        $user->scenario = 'token';
        $user->generateActivationToken();
        if (!$user->save()) {
            return [true, null, false];
        }
        if (empty($user->email)) {
            return [
                true,
                Yii::t('podium/flash', 'Sorry! There is no e-mail address saved with your account. Contact administrator about reactivating.'),
                true
            ];
        }
        if (!$this->sendReactivationEmail($user)) {
            return [
                true,
                Yii::t('podium/flash', 'Sorry! There was some error while sending you the account activation link. Contact administrator about this problem.'),
                true
            ];
        }
        return [
            false,
            Yii::t('podium/flash', 'The account activation link has been sent to your e-mail address.'),
            true
        ];
    }
public function run()
    {
        $user = $this->getUser(User::STATUS_REGISTERED);
        if (empty($user)) {
            return [
                true,
                Yii::t('podium/flash', 'Sorry! We can not find the account with that user name or e-mail address.'),
                false
            ];
        }
        $user->scenario = 'token';
        $user->generateActivationToken();
        if (!$user->save()) {
            return [true, null, false];
        }
        if (empty($user->email)) {
            return [
                true,
                Yii::t('podium/flash', 'Sorry! There is no e-mail address saved with your account. Contact administrator about reactivating.'),
                true
            ];
        }
        if (!$this->sendReactivationEmail($user)) {
            return [
                true,
                Yii::t('podium/flash', 'Sorry! There was some error while sending you the account activation link. Contact administrator about this problem.'),
                true
            ];
        }
        return [
            false,
            Yii::t('podium/flash', 'The account activation link has been sent to your e-mail address.'),
            true
        ];
    }
public function run ( ) { $ user = $ this -> getUser ( User :: STATUS_REGISTERED ) ; if ( empty ( $ user ) ) { return [ true , Yii :: t ( 'podium/flash' , 'Sorry! We can not find the account with that user name or e-mail address.' ) , false ] ; } $ user -> scenario = 'token' ; $ user -> generateActivationToken ( ) ; if ( ! $ user -> save ( ) ) { return [ true , null , false ] ; } if ( empty ( $ user -> email ) ) { return [ true , Yii :: t ( 'podium/flash' , 'Sorry! There is no e-mail address saved with your account. Contact administrator about reactivating.' ) , true ] ; } if ( ! $ this -> sendReactivationEmail ( $ user ) ) { return [ true , Yii :: t ( 'podium/flash' , 'Sorry! There was some error while sending you the account activation link. Contact administrator about this problem.' ) , true ] ; } return [ false , Yii :: t ( 'podium/flash' , 'The account activation link has been sent to your e-mail address.' ) , true ] ; }
Generates new activation token.
@return array $error flag, $message text, $back flag
Generates new activation token .