corrección bug en el id usuario

This commit is contained in:
Fredy Rivera 2017-02-02 20:55:22 -05:00
parent 4b8ce10005
commit 6b70c1d04c
1 changed files with 2 additions and 2 deletions

4
milfs/funciones/login.php Executable file → Normal file
View 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");