I have a user table 'UserInfo' and created two groups 'admin' and 'normal users' given some permissions to these groups.
I am adding the users to a particular group based on the type of the user i.e if user is admin I will give the permissions of the admin to that user.
Now I want to check whether a particular user has_perm or not, and also I want to add the user to the table auth_user_group. How can I do this?