diff --git a/www/protected/models/Usuario.php b/www/protected/models/Usuario.php index 3119a65..5ca9c3e 100644 --- a/www/protected/models/Usuario.php +++ b/www/protected/models/Usuario.php @@ -67,7 +67,7 @@ class Usuario extends CActiveRecord { // will receive user inputs. return array( array('email, password', 'required'), - array('email, nombre, apellidos, password, tipo, titulo, localidad, telefono', 'length', 'max' => 255), + array('email, nombre, apellidos, password, tipo, titulo, localidad', 'length', 'max' => 255), array('estado', 'length', 'max' => 1), @@ -76,6 +76,9 @@ class Usuario extends CActiveRecord { array('descripcion', 'safe'), + array('telefono', 'length', 'max' => 13), + array('telefono', 'match', 'pattern'=>'/^([+]?[0-9 ]+)$/'), + array('tipo', 'default', 'value' => self::TIPO_USUARIO_COORDINADOR), array('ficheroFotografia', 'file', diff --git a/www/themes/profind/views/usuario/_form.php b/www/themes/profind/views/usuario/_form.php index 7d2ee10..422606d 100644 --- a/www/themes/profind/views/usuario/_form.php +++ b/www/themes/profind/views/usuario/_form.php @@ -92,7 +92,7 @@ Yii::app()->clientScript->registerScript(