From 6b70c1d04c81e8d735d0d5be20c55c60baad54ab Mon Sep 17 00:00:00 2001 From: Fredy Rivera Date: Thu, 2 Feb 2017 20:55:22 -0500 Subject: [PATCH] =?UTF-8?q?correcci=C3=B3n=20bug=20en=20el=20id=20usuario?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- milfs/funciones/login.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) mode change 100755 => 100644 milfs/funciones/login.php diff --git a/milfs/funciones/login.php b/milfs/funciones/login.php old mode 100755 new mode 100644 index c255593..56412a4 --- a/milfs/funciones/login.php +++ b/milfs/funciones/login.php @@ -171,7 +171,7 @@ $mensaje ="El correo o usuario 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");