Ion Auth - Lightweight Auth System based on Redux Auth 2 |
[eluser]rulin[/eluser]
Hi Ben Just a quick question. I want to retrieve a list of groups so I can add a drop down list to the Create User view. I know I can get them with something like $this->ion_auth_model->get_groups(), but I seem to recall that you prefer if data was accessed via the library and not directly from the model. Any suggestions? I don’t want to start hacking the core library. Cheers Russ
[eluser]dhaulagiri[/eluser]
I cannot see register function in auth controller but there is in ion_auth library, how do i implement it ?
[eluser]rulin[/eluser]
[quote author="dhaulagiri" date="1300914182"]I cannot see register function in auth controller but there is in ion_auth library, how do i implement it ?[/quote] Hi dhaulagiri Look at function create_user() in the sample controller (auth.php), there is an example there. Code: if ($this->form_validation->run() == true && $this->ion_auth->register($username, $password, $email, $additional_data, $group)) Russ
[eluser]Ben Edmunds[/eluser]
Russ, You can use $this->ion_auth->get_groups(). The model methods are routed through the library.
[eluser]rulin[/eluser]
[quote author="Ben Edmunds" date="1300924011"]Russ, You can use $this->ion_auth->get_groups(). The model methods are routed through the library.[/quote] Thanks Ben Looked in ion_auth.php and couldn't see it... should have checked the user guide. Doh! Russ
[eluser]Kevin Smith[/eluser]
I'm writing a method to allow a user to update his/her email address, but I'd like to require them to enter their current password and have the application validate against that before updating the email address. Anyone have a best practice for how to do this?
[eluser]dhaulagiri[/eluser]
[quote author="rulin" date="1300918918"][quote author="dhaulagiri" date="1300914182"]I cannot see register function in auth controller but there is in ion_auth library, how do i implement it ?[/quote] Hi dhaulagiri Look at function create_user() in the sample controller (auth.php), there is an example there. Code: if ($this->form_validation->run() == true && $this->ion_auth->register($username, $password, $email, $additional_data, $group)) Russ[/quote] Do i need to create new function for user to register ?
[eluser]rulin[/eluser]
[quote author="dhaulagiri" date="1300949529"][quote author="rulin" date="1300918918"][quote author="dhaulagiri" date="1300914182"]I cannot see register function in auth controller but there is in ion_auth library, how do i implement it ?[/quote] Hi dhaulagiri Look at function create_user() in the sample controller (auth.php), there is an example there. Code: if ($this->form_validation->run() == true && $this->ion_auth->register($username, $password, $email, $additional_data, $group)) Russ[/quote] Do i need to create new function for user to register ?[/quote] If you mean you want a screen where users can register themselves, then yes. I don't think there is anything in Ben's demo code specifically for that. You can probably create something fairly easily based on the Create_user view. Russ
[eluser]dhaulagiri[/eluser]
i can see lots of people talking abt registration, hi ben can could u pls tell me, if i have to create register function in auth controller or it's already there somewhere ?
[eluser]rulin[/eluser]
[quote author="dhaulagiri" date="1300998990"]i can see lots of people talking abt registration, hi ben can could u pls tell me, if i have to create register function in auth controller or it's already there somewhere ?[/quote] If you go into /index.php/auth and log on with 'admin@admin.com' and 'password' it takes you into a user maintenance screen where you can register new users. Is this what you mean? Russ |
Welcome Guest, Not a member yet? Register Sign In |