Skip to content

Commit

Permalink
set user property with looping instead of manual
Browse files Browse the repository at this point in the history
  • Loading branch information
kresnasatya committed Mar 15, 2024
1 parent 60e82bc commit a272118
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions stubs/ci3/libraries/Webguard.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ public function guest()
public function user()
{
$unserialize_session = unserialize($_SESSION['serialize_session']);
$this->user->roles = $unserialize_session['roles'];
$this->user->role = $unserialize_session['role'];
foreach ($unserialize_session as $key => $value) {
$this->user->{$key} = $value;
}
return $this;
}

Expand Down

0 comments on commit a272118

Please sign in to comment.