hide user stats from anonymous
This commit is contained in:
parent
1c27df0dd0
commit
4cb59929d3
@ -122,7 +122,11 @@ class UserPage extends SimpleExtension {
|
||||
|
||||
if(($event instanceof PageRequestEvent) && $event->page_matches("user")) {
|
||||
$display_user = ($event->count_args() == 0) ? $user : User::by_name($event->get_arg(0));
|
||||
if(!is_null($display_user)) {
|
||||
if($event->count_args() == 0 && $user->is_anonymous()) {
|
||||
$this->theme->display_error($page, "Not Logged In",
|
||||
"You aren't logged in. First do that, then you can see your stats.");
|
||||
}
|
||||
else if(!is_null($display_user)) {
|
||||
send_event(new UserPageBuildingEvent($display_user));
|
||||
}
|
||||
else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user