Hello,
I am new to Yii, I would like to know if there is a quick, easy but yet secure way to encrypt the passwords directly from the Model Public function rules please:
public function rules()
{
// NOTE: you should only define rules for those attributes that
// will receive user inputs.
return array(
array('id, name, surname, email, user_name, user_pass, shop_name', 'required'),
array('id', 'numerical', 'integerOnly'=>true),
array('name, surname, email, user_name, user_pass, shop_name', 'length', 'max'=>45),
// The following rule is used by search().
// @todo Please remove those attributes that should not be searched.
array('id, name, surname, email, user_name, user_pass, shop_name', 'safe', 'on'=>'search'),
);
}
Thank you
Ben