Added profile check in login

This commit is contained in:
danielmaya 2018-04-18 10:54:51 +02:00
parent bc251e58df
commit 0cf5cc4b1a
1 changed files with 9 additions and 0 deletions

View File

@ -154,6 +154,15 @@ function process_user_login_local ($login, $pass, $api = false) {
// We get DB nick to put in PHP Session variable,
// to avoid problems with case-sensitive usernames.
// Thanks to David Muñiz for Bug discovery :)
$filter = array("id_usuario" => $login);
$user_profile = db_get_row_filter ("tusuario_perfil", $filter);
if(!$user_profile){
$mysql_cache["auth_error"] = "User does not have any profile";
$config["auth_error"] = "User does not have any profile";
return false;
}
return $row["id_user"];
}
else {