Welcome Guest, Not a member yet? Register   Sign In
flexi auth - A user authentication library for CodeIgniter

[eluser]haseydesign[/eluser]
@TheCry

Your problem is that you are using the model files within the flexi auth library instead of the 'application/library' files.
Methods/functions within the flexi auth model are ONLY meant to be used by the library files and should not be directly called by yourself.
So basically you're making extra work for yourself that is already handled by the libraries 'update_user()' and/or 'change_password()' functions.

From your comment, you seem to suggest that you need to update the password of another user, in which case you should use the update_user() function.

If you want to allow users to change their own password, then you can alternatively use the change_password() function, which requires the users current password and new password to validate they are the genuine user for that account.

Examples using these functions are available in both help guide links above.
For both functions, you do not need to hash the password, this is done automatically by the library, you just need to submit it to the function in plain text.


@Drumm

I'm guessing you may have solved this by now, but anyhow.
The problem you were getting is most likely that you hadn't defined the global '$this->auth' object prior to loading the library.

Code:
$this->auth = new stdClass;
$this->load->library('flexi_auth_lite', FALSE, 'flexi_auth');


@finalan

It looks like @Drumm help you solved your problem, drop me a message if your still having trouble.
Thanks @Drumm for helping out!


@zawaruddin

If you install the demo on your local computer, then you can access the user guide locally.
The reason it isn't available as a standalone guide, is that some user guide examples actually use live data from your current demo session to return live example data.


Messages In This Thread
flexi auth - A user authentication library for CodeIgniter - by El Forum - 01-02-2013, 07:48 PM



Theme © iAndrew 2016 - Forum software by © MyBB