Compare commits
1 Commits
main
...
MVC_perfil.php
| Author | SHA1 | Date | |
|---|---|---|---|
| 77e512be5b |
@@ -0,0 +1,14 @@
|
|||||||
|
<?php
|
||||||
|
if (session_status() === PHP_SESSION_NONE) {
|
||||||
|
session_start();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Redirección si el usuario no ha iniciado sesión
|
||||||
|
if (!isset($_SESSION['idUsuario'])) {
|
||||||
|
header('Location: login.php');
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
$nombreUsuario = htmlspecialchars($_SESSION['nombreUsuario'] ?? 'Usuario');
|
||||||
|
$avatarUsuario = htmlspecialchars($_SESSION['avatar'] ?? 'img/avatars/defaultProfile.jpeg');
|
||||||
|
?>
|
||||||
+2
-12
@@ -1,17 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
if (session_status() === PHP_SESSION_NONE) {
|
require_once '/controladores/controladorPerfil.php';
|
||||||
session_start();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Redirección si el usuario no ha iniciado sesión
|
|
||||||
if (!isset($_SESSION['idUsuario'])) {
|
|
||||||
header('Location: login.php');
|
|
||||||
exit();
|
|
||||||
}
|
|
||||||
|
|
||||||
$nombreUsuario = htmlspecialchars($_SESSION['nombreUsuario'] ?? 'Usuario');
|
|
||||||
$avatarUsuario = htmlspecialchars($_SESSION['avatar'] ?? 'img/avatars/defaultProfile.jpeg');
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="es">
|
<html lang="es">
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user