Added UserLoginEvent

This commit is contained in:
matthew
2019-07-04 12:48:33 -05:00
committed by Shish
parent 761834b6fa
commit cf8ed3b134
7 changed files with 27 additions and 8 deletions

View File

@ -750,6 +750,7 @@ class OuroborosAPI extends Extension
} else {
$user = User::by_id($config->get_int("anon_id", 0));
}
send_event(new UserLoginEvent($user));
} elseif (isset($_COOKIE[$config->get_string('cookie_prefix', 'shm') . '_' . 'session']) &&
isset($_COOKIE[$config->get_string('cookie_prefix', 'shm') . '_' . 'user'])
) {
@ -762,6 +763,7 @@ class OuroborosAPI extends Extension
} else {
$user = User::by_id($config->get_int("anon_id", 0));
}
send_event(new UserLoginEvent($user));
}
}