public function actionPassword($token)
    {
        if ($this->module->userComponent !== true) {
            $this->info(Yii::t('podium/flash', 'Please contact the administrator to change your account password.'));
            return $this->module->goPodium();
        }

        $model = User::findByPasswordResetToken($token);
        if (!$model) {
            $this->error(Yii::t('podium/flash', 'The provided password reset token is invalid or expired.'));
            return $this->module->goPodium();
        }
        $model->scenario = 'passwordChange';
        if ($model->load(Yii::$app->request->post()) && $model->changePassword()) {
            Log::info('Password changed', $model->id, __METHOD__);
            $this->success(Yii::t('podium/flash', 'Your account password has been changed.'));
            return $this->module->goPodium();
        }
        return $this->render('password', ['model' => $model]);
    }
public function actionPassword($token)
    {
        if ($this->module->userComponent !== true) {
            $this->info(Yii::t('podium/flash', 'Please contact the administrator to change your account password.'));
            return $this->module->goPodium();
        }

        $model = User::findByPasswordResetToken($token);
        if (!$model) {
            $this->error(Yii::t('podium/flash', 'The provided password reset token is invalid or expired.'));
            return $this->module->goPodium();
        }
        $model->scenario = 'passwordChange';
        if ($model->load(Yii::$app->request->post()) && $model->changePassword()) {
            Log::info('Password changed', $model->id, __METHOD__);
            $this->success(Yii::t('podium/flash', 'Your account password has been changed.'));
            return $this->module->goPodium();
        }
        return $this->render('password', ['model' => $model]);
    }
public function actionPassword ( $ token ) { if ( $ this -> module -> userComponent !== true ) { $ this -> info ( Yii :: t ( 'podium/flash' , 'Please contact the administrator to change your account password.' ) ) ; return $ this -> module -> goPodium ( ) ; } $ model = User :: findByPasswordResetToken ( $ token ) ; if ( ! $ model ) { $ this -> error ( Yii :: t ( 'podium/flash' , 'The provided password reset token is invalid or expired.' ) ) ; return $ this -> module -> goPodium ( ) ; } $ model -> scenario = 'passwordChange' ; if ( $ model -> load ( Yii :: $ app -> request -> post ( ) ) && $ model -> changePassword ( ) ) { Log :: info ( 'Password changed' , $ model -> id , __METHOD__ ) ; $ this -> success ( Yii :: t ( 'podium/flash' , 'Your account password has been changed.' ) ) ; return $ this -> module -> goPodium ( ) ; } return $ this -> render ( 'password' , [ 'model' => $ model ] ) ; }
Changing the account password with provided token.
@param string $token
@return string|Response
Changing the account password with provided token .