public function actionResendChange()
    {
        /** @var \amnah\yii2\user\models\User $user */
        /** @var \amnah\yii2\user\models\UserToken $userToken */

        // find userToken of type email change
        $user = Yii::$app->user->identity;
        $userToken = $this->module->model("UserToken");
        $userToken = $userToken::findByUser($user->id, $userToken::TYPE_EMAIL_CHANGE);
        if ($userToken) {

            // send email and set flash message
            $user->sendEmailConfirmation($userToken);
            Yii::$app->session->setFlash("Resend-success", Yii::t("user", "Confirmation email resent"));
        }

        return $this->redirect(["/user/account"]);
    }
public function actionResendChange()
    {
        /** @var \amnah\yii2\user\models\User $user */
        /** @var \amnah\yii2\user\models\UserToken $userToken */

        // find userToken of type email change
        $user = Yii::$app->user->identity;
        $userToken = $this->module->model("UserToken");
        $userToken = $userToken::findByUser($user->id, $userToken::TYPE_EMAIL_CHANGE);
        if ($userToken) {

            // send email and set flash message
            $user->sendEmailConfirmation($userToken);
            Yii::$app->session->setFlash("Resend-success", Yii::t("user", "Confirmation email resent"));
        }

        return $this->redirect(["/user/account"]);
    }
public function actionResendChange ( ) { /** @var \amnah\yii2\user\models\User $user */ /** @var \amnah\yii2\user\models\UserToken $userToken */ // find userToken of type email change $ user = Yii :: $ app -> user -> identity ; $ userToken = $ this -> module -> model ( "UserToken" ) ; $ userToken = $ userToken :: findByUser ( $ user -> id , $ userToken :: TYPE_EMAIL_CHANGE ) ; if ( $ userToken ) { // send email and set flash message $ user -> sendEmailConfirmation ( $ userToken ) ; Yii :: $ app -> session -> setFlash ( "Resend-success" , Yii :: t ( "user" , "Confirmation email resent" ) ) ; } return $ this -> redirect ( [ "/user/account" ] ) ; }
Resend email change confirmation
Resend email change confirmation