mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 16:55:05 +02:00
Merge branch 'cherry-pick-2019c975' into 'pandora_6.0'
Merge branch '19-usuario-con-not-login-puede-entrar-int-4355' See merge request !47
This commit is contained in:
commit
0640b50335
@ -509,7 +509,41 @@ if (! isset ($config['id_user'])) {
|
|||||||
exit ("</html>");
|
exit ("</html>");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
$user_in_db = db_get_row_filter('tusuario',
|
||||||
|
array('id_user' => $config['id_user']), '*');
|
||||||
|
if ($user_in_db == false) {
|
||||||
|
//logout
|
||||||
|
$_REQUEST = array ();
|
||||||
|
$_GET = array ();
|
||||||
|
$_POST = array ();
|
||||||
|
$config["auth_error"] = __("User doesn\'t exist.");
|
||||||
|
$iduser = $_SESSION["id_usuario"];
|
||||||
|
logoff_db ($iduser, $_SERVER["REMOTE_ADDR"]);
|
||||||
|
unset($_SESSION["id_usuario"]);
|
||||||
|
unset($iduser);
|
||||||
|
require_once ('general/login_page.php');
|
||||||
|
while (@ob_end_flush ());
|
||||||
|
exit ("</html>");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (((bool) $user_in_db['is_admin'] === false) &&
|
||||||
|
((bool) $user_in_db['not_login'] === true)) {
|
||||||
|
//logout
|
||||||
|
$_REQUEST = array ();
|
||||||
|
$_GET = array ();
|
||||||
|
$_POST = array ();
|
||||||
|
$config["auth_error"] = __("User only can use the API.");
|
||||||
|
$iduser = $_SESSION["id_usuario"];
|
||||||
|
logoff_db ($iduser, $_SERVER["REMOTE_ADDR"]);
|
||||||
|
unset($_SESSION["id_usuario"]);
|
||||||
|
unset($iduser);
|
||||||
|
require_once ('general/login_page.php');
|
||||||
|
while (@ob_end_flush ());
|
||||||
|
exit ("</html>");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
// Log off
|
// Log off
|
||||||
if (isset ($_GET["bye"])) {
|
if (isset ($_GET["bye"])) {
|
||||||
include ("general/logoff.php");
|
include ("general/logoff.php");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user