File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -314,6 +314,10 @@ public function emitOTP()
314314
315315 $ user = $ this ->auth_service ->getUserByUsername ($ username );
316316
317+ if (is_null ($ user )) {
318+ throw new EntityNotFoundException ();
319+ }
320+
317321 if (!$ user ->isActive ())
318322 throw new ValidationException
319323 (
Original file line number Diff line number Diff line change @@ -509,6 +509,10 @@ class LoginPage extends React.Component {
509509 } ) ;
510510 } , ( error ) => {
511511 let { response, status, message} = error ;
512+ if ( status == 404 ) {
513+ this . showAlert ( 'We couldn\'t find an account with the email provided.' , 'error' ) ;
514+ return ;
515+ }
512516 if ( status == 412 ) {
513517 const { message, errors} = response . body ;
514518 this . showAlert ( errors [ 0 ] , 'error' ) ;
You can’t perform that action at this time.
0 commit comments