fix message issue (#1063)
This commit is contained in:
parent
02cf8f0da3
commit
09150d6940
|
@ -33,7 +33,7 @@ class MainHomePageLoginWidget extends React.Component {
|
|||
loadingLogin: false,
|
||||
loadingRecover: false,
|
||||
reSendEMailVerificationLoading: false,
|
||||
reSendEmailVerificationStep: 0,
|
||||
reSendEmailVerificationStep: UNVERIFIED_USER_STEP,
|
||||
reSendEmailVerificationMessage: ""
|
||||
};
|
||||
|
||||
|
@ -90,7 +90,7 @@ class MainHomePageLoginWidget extends React.Component {
|
|||
|
||||
case REQUEST_RESULT_STEP:
|
||||
return (
|
||||
(this.state.emailVerificationMessage === "success") ?
|
||||
(this.state.reSendEmailVerificationMessage === "success") ?
|
||||
<Message className="login-widget__resend-email-verification-success" type="success" leftAligned>
|
||||
{i18n('RESEND_EMAIL_VERIFICATION_SUCCESS')}
|
||||
</Message> :
|
||||
|
@ -236,12 +236,12 @@ class MainHomePageLoginWidget extends React.Component {
|
|||
}).then(() => {
|
||||
this.setState({
|
||||
reSendEmailVerificationStep: REQUEST_RESULT_STEP,
|
||||
reSendEMailVerificationMessage: 'success'
|
||||
reSendEmailVerificationMessage: 'success'
|
||||
})
|
||||
}).catch(() => {
|
||||
this.setState({
|
||||
reSendEmailVerificationStep: REQUEST_RESULT_STEP,
|
||||
reSendEMailVerificationMessage: 'error'
|
||||
reSendEmailVerificationMessage: 'error'
|
||||
})
|
||||
});
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ class LoginController extends Controller {
|
|||
|
||||
public function handler() {
|
||||
$this->clearOldRememberTokens();
|
||||
|
||||
|
||||
if ($this->checkInputCredentials() || $this->checkRememberToken()) {
|
||||
if($this->userInstance->verificationToken !== null) {
|
||||
throw new RequestException(ERRORS::UNVERIFIED_USER);
|
||||
|
|
Loading…
Reference in New Issue