Added $user_config global based on existing config object for storing user-specific settings.

Added event to the user page so that extensions can hook into it, providing user-specific setting controls
This commit is contained in:
matthew
2019-06-27 08:12:15 -05:00
committed by Shish
parent 88e6e68d79
commit 120cdb49a6
7 changed files with 120 additions and 25 deletions

View File

@@ -188,6 +188,17 @@ class UserPage extends Extension
ksort($event->stats);
$this->theme->display_user_page($event->display_user, $event->stats);
if (!$user->is_anonymous()) {
if ($user->id == $event->display_user->id || $user->can("edit_user_info")) {
$uobe = new UserOptionsBuildingEvent();
send_event($uobe);
$page->add_block(new Block("Options", $this->theme->build_options($event->display_user, $uobe), "main", 60));
}
}
if ($user->id == $event->display_user->id) {
$ubbe = new UserBlockBuildingEvent();
send_event($ubbe);