Simplify code

This commit is contained in:
Dmitrii Metelkin 2019-11-17 00:19:36 +11:00
parent 1be8efccb3
commit 75f5fa7e15

View file

@ -157,11 +157,8 @@ class auth_plugin_userkey extends auth_plugin_base {
print_error($exception->errorcode); print_error($exception->errorcode);
} }
if (isloggedin()) { if (isloggedin() && $SESSION->userid != $key->userid) {
if ($SESSION->userid != $key->userid) { require_logout();
require_logout();
$this->user_login_userkey();
}
} }
$this->userkeymanager->delete_keys($key->userid); $this->userkeymanager->delete_keys($key->userid);