/** * Add the roles to the profile body tag * * @param ProfileController $sender Sending controller instance. * @param array $args Event arguments. */ public function profileController_render_before($sender, $args) { $cssRoles = $sender->data('UserRoles'); if (!is_array($cssRoles)) { return; } foreach ($cssRoles as &$rawRole) { $rawRole = $this->formatRoleCss($rawRole); } $sender->CssClass = trim($sender->CssClass . ' ' . implode(' ', $cssRoles)); }
/** * * @param ProfileController $Sender */ public function profileController_CustomNotificationPreferences_Handler($Sender) { if (!$Sender->data('NoEmail') && Gdn::session()->checkPermission('Garden.AdvancedNotifications.Allow')) { include $Sender->fetchViewLocation('NotificationPreferences', 'Settings', 'Vanilla'); } }