bug fixes on activity log and array_key_first alt using reset

This commit is contained in:
Kwesi Banson
2024-02-16 19:46:38 +00:00
parent d4ab479e0c
commit 7b3a29ca53
25 changed files with 579 additions and 160 deletions

View File

@@ -47,8 +47,10 @@ class Controller extends BaseController
return $response;
}
public function logUsersActivity($type, $content){
$user_id = session('current_user.id');
public function logUsersActivity($type, $content, $user_id = null){
if($user_id == null){
$user_id = session('current_user.id');
}
$activity_arr = [
'type' => $type,
'content' => $content,