forked from qwerty/tupali
corrección bug en el id usuario
This commit is contained in:
parent
4b8ce10005
commit
6b70c1d04c
4
milfs/funciones/login.php
Executable file → Normal file
4
milfs/funciones/login.php
Executable file → Normal file
@ -171,7 +171,7 @@ $mensaje ="El <strong>correo o usuario</strong> no se encuentra registrado aún.
|
||||
}
|
||||
|
||||
//$consulta = "SELECT * FROM $tabla_autenticacion WHERE (email = '$email' OR username = '$email' )AND passwd = '$password' LIMIT 1";
|
||||
$consulta= "SELECT *
|
||||
$consulta= "SELECT *, $tabla_autenticacion.id AS id_usuario
|
||||
FROM $tabla_autenticacion, usuarios_grupo
|
||||
WHERE (email = '$email' OR username = '$email' )AND passwd = '$password'
|
||||
AND $tabla_autenticacion.id_grupo = usuarios_grupo.id
|
||||
@ -191,7 +191,7 @@ $consulta= "SELECT *
|
||||
//session_destroy();
|
||||
$_SESSION = array();
|
||||
$_SESSION['username']= mysqli_result($sql,0,"username");
|
||||
$_SESSION['id']= mysqli_result($sql,0,"id");
|
||||
$_SESSION['id']= mysqli_result($sql,0,"id_usuario");
|
||||
$_SESSION['grupo']= mysqli_result($sql,0,"id_grupo");
|
||||
$_SESSION['tabla_autenticacion']= "$tabla_autenticacion";
|
||||
$_SESSION['prioridad'] = mysqli_result($sql,0,"prioridad");
|
||||
|
Loading…
Reference in New Issue
Block a user