fix logic and tests, update docker CI file

This commit is contained in:
root
2026-03-09 15:58:44 -04:00
parent 1cb3573d4b
commit 79e44fe037
188 changed files with 1776 additions and 524 deletions
+39
View File
@@ -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)]);
}
}