Permalink
Browse files

Manage paramsters on mgd level, acl shouldn't factor into this

  • Loading branch information...
flack committed Oct 28, 2017
1 parent ea58c4e commit 4c9863bcea57a41f852e21df78afa533a5931623
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/midcom/services/auth/backend.php
@@ -117,7 +117,7 @@ private function check_timestamp($timestamp, midcom_core_user $user)
if ($timestamp < time() - midcom::get()->config->get('auth_login_session_update_interval')) {
// Update the timestamp if previous timestamp is older than specified interval
$this->update_session();
$person = $user->get_storage();
$person = $user->get_storage()->__object;
$person->set_parameter('midcom', 'online', time());
}
return true;
@@ -172,7 +172,7 @@ public function login($username, $password, $clientip = null, $trusted = false)
}
if ($this->create_session($clientip, $user)) {
$person = $user->get_storage();
$person = $user->get_storage()->__object;
$person->set_parameter('midcom', 'online', time());
return $user;
}
@@ -185,7 +185,7 @@ public function login($username, $password, $clientip = null, $trusted = false)
public function logout(midcom_core_user $user)
{
if ($person = $user->get_storage()) {
$person->delete_parameter('midcom', 'online');
$person->__object->delete_parameters(['domain' => 'midcom', 'name' => 'online']);
}
$this->delete_session();
midcom_connection::logout();

0 comments on commit 4c9863b

Please sign in to comment.