flexi auth - A user authentication library for CodeIgniter |
[eluser]haseydesign[/eluser]
@code_has_been_ignited Hey man, Regarding how to return error messages with actions like failed logins, you can use the 'get_messages()' function. How you implement the passing of data returned from this function to your view is up to you. You could simply call the function directly within you view if you wanted. What I will note though is that if like in the demo you add the returned messages to a CI flash session, then the page must be reloaded before the message will be available from the flash session data - this is just how CI's session class works. So as an example for returning error messages using CI flash sessions after a login attempt, you could use the following code: Code: // Attempt to login user. To return the message instantly: Code: // Attempt to login user. |
Welcome Guest, Not a member yet? Register Sign In |