File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -258,14 +258,15 @@ public function getAccount()
258258
259259 $ user = $ this ->auth_service ->getUserByUsername ($ email );
260260
261- if (is_null ($ user ) || ! $ user -> canLogin () )
261+ if (is_null ($ user ))
262262 throw new EntityNotFoundException ();
263263
264264 return $ this ->ok (
265265 [
266+ 'can_login ' => $ user ->canLogin (),
266267 'pic ' => $ user ->getPic (),
267268 'full_name ' => $ user ->getFullName (),
268- 'has_password_set ' => $ user ->hasPasswordSet ()
269+ 'has_password_set ' => $ user ->hasPasswordSet (),
269270 ]
270271 );
271272 } catch (ValidationException $ ex ) {
Original file line number Diff line number Diff line change @@ -533,10 +533,10 @@ class LoginPage extends React.Component {
533533 ...this . state ,
534534 user_pic : response . pic ,
535535 user_fullname : response . full_name ,
536- user_verified : true ,
536+ user_verified : response . can_login ,
537537 authFlow : response . has_password_set ? password_flow : otp_flow ,
538538 errors : {
539- email : ' ',
539+ email : response . can_login ? '' : 'User is inactive or email verification is pending. ',
540540 otp : '' ,
541541 password : ''
542542 } ,
You can’t perform that action at this time.
0 commit comments