CakeDC / users

Users Plugin for CakePHP
https://www.cakedc.com
Other
521 stars 296 forks source link

How to limit the access only to some users? #989

Closed SandroNigro closed 2 years ago

SandroNigro commented 2 years ago

I used CakeDC for logging via social (google to be precise). Everything works correctly, but if I want to limit the access to my system only to some users, for example those who are already registered, how can I do it? I haven't found anything that explains this situation. For example, after a user has successfully logged in from social where should I check if this user can access or not? Thank you very much.

rochamarcelo commented 2 years ago

Hi @SandroNigro you will need to extend the behavior https://github.com/CakeDC/users/blob/master/src/Model/Behavior/SocialBehavior.php#L68 and probably create a custom users table too.

SandroNigro commented 2 years ago

Thank you for your response. I will try your advice.