Here are the details:
//User.php
public function hashPassword($password,$salt)
{
return md5($salt.$password);
}//UserController.php
public function beforeSave()
{
if (parent::beforeSave())
{
if ($this->isNewRecord)
{
$this->password = User::hashPassword($this->password,'s0m3s@Lt');
}
return true;
}
}Maybe my codes are incorrect,or I placed the functions in an incorrect file, or both...which is more likely.
I am a newbie, please make it simple for me

Help
















