Skip to content
Snippets Groups Projects
Commit 72af5505 authored by Moreau Elise's avatar Moreau Elise
Browse files

check if user is the logged user

parent 20809811
No related branches found
No related tags found
No related merge requests found
......@@ -174,6 +174,14 @@ class User implements JsonSerializable
return $this->admins;
}
/**
* @return bool
*/
public function isCurrentUser(): bool
{
return $_SESSION['userId'] == $this->id;
}
/**
* Set property
*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment