It’s clear for me how to read a user/pass from database using encrypted passwords with SQLAuth, but when I create (for ex.) a register form, how can I do to encrypt the user password ?
Thanks,
Alejandro
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use
$this->api->auth->encryptPassword($password,$salt)The first argument is the password string, the second is the salt that is mandatory for sha256/salt encryption mode.
You can store the result in the password field of your model (or in the table directly with dsql).
The first application tutorial can be useful too: http://agiletoolkit.org/learn/app/auth