CodeIgniter Forums
active field in users table of Shield - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30)
+--- Thread: active field in users table of Shield (/showthread.php?tid=83481)



active field in users table of Shield - Lihuen - 09-29-2022

Hi there, trying Shield. When active field in users table is 0, users CAN login anyway. Is that correct?

Thanks!


RE: active field in users table of Shield - InsiteFX - 09-30-2022

User table active is for when you activate the user, like you send them and email to activate their account.

If active is false the user should not be able to login until active is true.


RE: active field in users table of Shield - Lihuen - 09-30-2022

Yes, correct. I understand the concept but currently if the active field is 0 (does not accept NULL) the user can log in anyway.
Therefore I understand that it is not yet implemented in shield. That's correct? Thanks


RE: active field in users table of Shield - datamweb - 02-05-2023

@Lihuen This issue has been resolved. If the user is not active, it is not possible to login.


RE: active field in users table of Shield - BeyondMark - 10-04-2023

Hi,

I have updated to the latest Codeigniter 4.4.1 using composer. My composer.json has the line "codeigniter4/shield": "^1.0.0-beta" and as far as I can tell I have v1.0.0-beta.6 installed.

Should the active user fix have been implemented as I am still able to login as a user with active = 0 in the users table.  Is there something else I need to do?

Thanks
Mark


RE: active field in users table of Shield - mshannaq - 10-29-2023

(02-05-2023, 08:30 AM)datamweb Wrote: @Lihuen This issue has been resolved. If the user is not active, it is not possible to login.

Even though I'm using v1.0.0-beta.7, users can still log in, even if their status is set to active=0


RE: active field in users table of Shield - kenjis - 10-29-2023

See https://codeigniter4.github.io/shield/references/authorization/#user-activation