Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

zulqarnain's avatar

Multiuser Authentication and authorization

What is the best way for multiuser authentication and authorization and how to define roles for the user. is there any tutorials available for learning. Thank you.

0 likes
5 replies
Lumethys's avatar

@zulqarnain that is a weird way to name it

depend on the project, how complex is it, how different is an Admin versus a Customer

if your app only had admin and customer, you could add an is_admin field to the users table

Lumethys's avatar

@zulqarnain depend on the size of your site there are many appropriate design structure. But judging that you have to ask here, i guess this is small site?

You could have a role field in your user table, or if you want something more complicated, a Role table would suffice

Please or to participate in this conversation.