Arreglado el error con la modificación de la contraseña al actualizar el usuario.
git-svn-id: https://192.168.0.254/svn/Proyectos.Incam_PROFIND_Web/trunk@3 3fe1ab16-cfe0-e34b-8c9f-7d8c168d430d
This commit is contained in:
parent
1e044b6498
commit
17089246cc
@ -58,10 +58,13 @@ class Usuario extends CActiveRecord {
|
||||
// NOTE: you should only define rules for those attributes that
|
||||
// will receive user inputs.
|
||||
return array(
|
||||
array('email, nombre, apellidos, titulo, localidad, telefono, password', 'length', 'max' => 255),
|
||||
array('email, nombre, apellidos, titulo, localidad, telefono', 'length', 'max' => 255),
|
||||
array('email', 'required'),
|
||||
array('email', 'email'),
|
||||
array('email', 'unique'),
|
||||
|
||||
array('password', 'required', 'on' => 'insert'),
|
||||
|
||||
array('id, id_empresa, email, nombre, apellidos, titulo, localidad, telefono', 'safe', 'on' => 'search'),
|
||||
);
|
||||
}
|
||||
@ -138,11 +141,6 @@ class Usuario extends CActiveRecord {
|
||||
));
|
||||
}
|
||||
|
||||
protected function afterValidate() {
|
||||
parent::afterValidate();
|
||||
$this->password = $this->encrypt($this->password);
|
||||
}
|
||||
|
||||
public function encrypt($value) {
|
||||
return md5($value);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user