- Tarea #1113 -> Poder dar de baja la cuenta de usuario
git-svn-id: https://192.168.0.254/svn/Proyectos.Incam_PROFIND_Web/trunk@51 3fe1ab16-cfe0-e34b-8c9f-7d8c168d430d
This commit is contained in:
parent
8afe5926dc
commit
3df8ebee09
@ -17,7 +17,8 @@ class IdentificacionUsuario extends CBaseUserIdentity {
|
||||
//const ERROR_UNKNOWN_IDENTITY=100;
|
||||
|
||||
const ERROR_ESTADO_NOACTIVO=3;
|
||||
const ERROR_ESTADO_DENEGADO=4;
|
||||
const ERROR_ESTADO_BORRADO=4;
|
||||
const ERROR_ESTADO_DENEGADO=5;
|
||||
|
||||
/**
|
||||
* Contructor.
|
||||
@ -43,6 +44,8 @@ class IdentificacionUsuario extends CBaseUserIdentity {
|
||||
$this->errorCode = self::ERROR_PASSWORD_INVALID;
|
||||
else if($usuario->estado == Usuario::ESTADO_NOACTIVO)
|
||||
$this->errorCode = self::ERROR_ESTADO_NOACTIVO;
|
||||
else if($usuario->estado == Usuario::ESTADO_BORRADO)
|
||||
$this->errorCode = self::ERROR_ESTADO_BORRADO;
|
||||
else if($usuario->estado == Usuario::ESTADO_DENEGADO)
|
||||
$this->errorCode = self::ERROR_ESTADO_DENEGADO;
|
||||
else {
|
||||
|
||||
@ -228,6 +228,11 @@ class RegistroUsuarioController extends Controller {
|
||||
'mensaje' => Yii::t('profind', 'No se puede cancelar la cuenta.<br>La URL de cancelación es incorrecta.'),
|
||||
));
|
||||
} elseif ($usuario->estado == Usuario::ESTADO_NOACTIVO) {
|
||||
$this->render('//site/error', array(
|
||||
'titulo' => Yii::t('profind', 'Cuenta no confirmada'),
|
||||
'mensaje' => Yii::t('profind', 'No se ha realizado ningún cambio.<br>La cuenta no está confirmada.'),
|
||||
));
|
||||
} elseif ($usuario->estado == Usuario::ESTADO_BORRADO) {
|
||||
$this->render('//site/error', array(
|
||||
'titulo' => Yii::t('profind', 'Cuenta ya cancelada'),
|
||||
'mensaje' => Yii::t('profind', 'No se ha realizado ningún cambio.<br>La cuenta ya estaba cancelada.'),
|
||||
|
||||
@ -28,7 +28,8 @@ class Usuario extends CActiveRecord {
|
||||
|
||||
const ESTADO_NOACTIVO = 0;
|
||||
const ESTADO_ACTIVO = 1;
|
||||
const ESTADO_DENEGADO = 2;
|
||||
const ESTADO_BORRADO = 2;
|
||||
const ESTADO_DENEGADO = 3;
|
||||
|
||||
const TIPO_USUARIO_COORDINADOR = 'C';
|
||||
const TIPO_USUARIO_AGENTE = 'A';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user