reconstruction of the project

This commit is contained in:
root
2026-03-08 16:33:24 -04:00
parent 23b7db1107
commit c8de5f7edc
9157 changed files with 77877 additions and 1073823 deletions
@@ -0,0 +1,39 @@
<?php
namespace App\Controllers\View;
use CodeIgniter\Controller;
use App\Models\UserModel;
use CodeIgniter\Database\Exceptions\DatabaseException;
class InfoIconController extends Controller
{
public function profileIcon()
{
$session = session();
$userId = $session->get('user_id');
if (!$userId) {
return view('errors/html/error_401', ['message' => 'User not logged in']);
}
$userModel = new UserModel();
$user = $userModel->getUserInfoById($userId);
if ($user) {
$data = [
'userName' => $user['firstname'] . ' ' . $user['lastname'],
'userInitials' => strtoupper($user['firstname'][0] . $user['lastname'][0])
];
} else {
$data = [
'userName' => 'User not found',
'userInitials' => '??'
];
}
return view('partials/header', $data);
// return view('dashboard', ['content' => view('partials/user_icon', $data)]);
}
}