|
|
|
@ -52,11 +52,11 @@ if (isset($_GET["idUser"]) && $_GET["idUser"] == 0) {
|
|
|
|
|
$msg = "alert('Informe a senha');"; |
|
|
|
|
} else if (($_POST["btGravar"] != "Alterar") && ExisteRegistro($dbcon, "pbx_usuarios", "apelido", (strtolower($_POST["userLogin"])))) { |
|
|
|
|
$msg = "alert('Login já cadastrado!');"; |
|
|
|
|
} else if (($_POST["btGravar"] != "Alterar") && ExisteRegistro($dbcon, "pbx_usuarios", "matricula", ($_POST["userMatriculaH"]))) { |
|
|
|
|
} else if (($_POST["btGravar"] != "Alterar") && ExisteRegistro($dbcon, "pbx_usuarios", "matricula", ($_POST["userMatriculaH"]), null, true)) { |
|
|
|
|
$msg = "alert('Matrícula já cadastrada!');"; |
|
|
|
|
} else if ($_POST["userEmail"] && !is_email($_POST["userEmail"])) { |
|
|
|
|
$msg = "alert('Email Inválido!');"; |
|
|
|
|
} else if (ExisteRegistro($dbcon, "pbx_usuarios", "email", (strtolower($_POST["userEmail"])), ($idUser ? "a.id <> {$idUser}" : ''))) { |
|
|
|
|
} else if (ExisteRegistro($dbcon, "pbx_usuarios", "email", (strtolower($_POST["userEmail"])), ($idUser ? "a.id <> {$idUser}" : ''), true)) { |
|
|
|
|
$msg = "alert('O e-mail informado já foi registrado!');"; |
|
|
|
|
} else if ($_POST["userExpiraSenha"] < 0) { |
|
|
|
|
$msg = "alert('O tempo de expiração deve ser maior ou igual 0 'zero');"; |
|
|
|
|