public function Verify($UserID, $Verified) { $this->Permission('Garden.Moderation.Manage'); if (!$this->Request->IsAuthenticatedPostBack()) { throw PermissionException('Javascript'); } // First, set the field value. Gdn::UserModel()->SetField($UserID, 'Verified', $Verified); $User = Gdn::UserModel()->GetID($UserID); if (!$User) { throw NotFoundException('User'); } // Send back the verified button. require_once $this->FetchViewLocation('helper_functions', 'Profile', 'Dashboard'); $this->JsonTarget('.User-Verified', UserVerified($User), 'ReplaceWith'); $this->Render('Blank', 'Utility', 'Dashboard'); }
</dd> <dt class="LastActive"><?php echo t('Last Active'); ?> </dt> <dd class="LastActive"><?php echo Gdn_Format::date($this->User->DateLastActive, 'html'); ?> </dd> <dt class="Roles"><?php echo t('Roles'); ?> </dt> <dd class="Roles"><?php if (Gdn::session()->checkPermission('Garden.Moderation.Manage')) { echo UserVerified($this->User) . ', '; } if (empty($this->Roles)) { echo t('No Roles'); } else { echo htmlspecialchars(implode(', ', array_column($this->Roles, 'Name'))); } ?> </dd> <?php if ($Points = valr('User.Points', $this, 0)) { // Only show positive point totals ?> <dt class="Points"><?php echo t('Points'); ?>