Welcome Guest, Not a member yet? Register   Sign In
Registering User and assigning roles through Admin
#1

Greetings! i'm fairly new to PHP, myth/auth, and CI. Just started like 3 days ago.  
I wanted to know how i can register a user  and assign them roles as an admin. Basically, i create the accounts and not the users themselves. I can successfully register a user as an admin but i'm stuck on how i can push data from a list of roles to the register method in AuthController so i can specifically add that user to the roles. Reading through the documentation of Myth/auth, i can add it with "withGroup" method. but im not sure how i can pass data from <select> tag to the register method.
Reply
#2

Found a way but i dont know if it is the best solution, although it works. I got the post request of the <select> tag and passed that to the withGroup method.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB