frontend/models/forms/ChangePasswordForm.php
/**
     * Signs user up.
     *
     * @return Users|null the saved model or null if saving fails
     */
Signs user up.
@return Users|null the saved model or null if saving fails
Signs user up . @return Users|null the saved model or null if saving fails
public function changePasswordStep2()
    {
        if ($this->validate()) {
            $user = Users::findByPasswordResetToken($this->token);
            if ($user) {
                $user->setPassword($this->new_password);
                $user->removePasswordResetToken();
                if ($user->save()) {
                    NodeApi::sendCredentialsForUserNodes($user);
                    $this->old_password = "";
                    $this->new_password = "";
                    $this->repeat_password = "";
                    return $user;
                }
            }
        }
        return null;
    }
public function changePasswordStep2 ( ) { if ( $ this -> validate ( ) ) { $ user = Users :: findByPasswordResetToken ( $ this -> token ) ; if ( $ user ) { $ user -> setPassword ( $ this -> new_password ) ; $ user -> removePasswordResetToken ( ) ; if ( $ user -> save ( ) ) { NodeApi :: sendCredentialsForUserNodes ( $ user ) ; $ this -> old_password = " " ; $ this -> new_password = " " ; $ this -> repeat_password = " " ; return $ user ; } } } return null ; }
Signs user up.
Signs user up .
// тут сгенерировать новые ремот-акшены=credentials для нод credentials //var_dump($this->getErrors());