flexi auth - A user authentication library for CodeIgniter |
[eluser]haseydesign[/eluser]
@NotSmilie From your example where you define Code: $data['message'] = (! isset($data['message'])) ? $this->session->flashdata('message') : $data['message']; I can't see whether you have set the flexi auth library message to the flash data - so I'm guessing this is what is wrong. To get a status/error message from the library, you call the 'get_messages()' function. So with your insert user example, your code would look something like: Code: $data['res'] = $this->flexi_auth->insert_user(...); The code you're currently using looks like a copy and paste from the demo, which is saving the message to CI's flash session data (Via the login method in demo_auth_model.php) before it performs a redirect - hence the use of flash data so the message is available once the page is reloaded. If you don't need/want to use a redirect once the user is inserted, you can just catch the message without using CI's flash data. If you want to get a bit more complicated than just outputting the message, you could try using the 'get_messages_array()' function. |
Welcome Guest, Not a member yet? Register Sign In |