public function UnBan($UserID, $Options = array()) {
      $User = $this->GetID($UserID, DATASET_TYPE_ARRAY);
      if (!$User)
         throw NotFoundException();
      
      if (!$User['Banned'])
         throw new Gdn_UserException(T("The user isn't banned."));
      
      // Unban the user.
      $this->SetField($UserID, 'Banned', FALSE);
      
      // Restore the user's content.
      if (GetValue('RestoreContent', $Options)) {
         $BanLogID = $this->GetAttribute($UserID, 'BanLogID');
         
         if ($BanLogID) {
            $LogModel = new LogModel();

            try {
               $LogModel->Restore($BanLogID);
            } catch (Exception $Ex) {
               if ($Ex->getCode() != 404)
                  throw $Ex;
            }
            $this->SaveAttribute($UserID, 'BanLogID', NULL);
         }
      }
      
      // Add an activity for the unbanning.
      if (GetValue('AddActivity', $Options, TRUE)) {
         $ActivityModel = new ActivityModel();
         
         $Story = GetValue('Story', $Options, NULL);
         
         // Notify the moderators of the unban.
         $Activity = array(
             'ActivityType' => 'Ban',
             'NotifyUserID' => ActivityModel::NOTIFY_MODS,
             'ActivityUserID' => $UserID,
             'RegardingUserID' => Gdn::Session()->UserID,
             'HeadlineFormat' => T('HeadlineFormat.Unban', '{RegardingUserID,You} unbanned {ActivityUserID,you}.'),
             'Story' => $Story);
         
         $ActivityModel->Queue($Activity);
         
         // Notify the user of the unban.
         $Activity['NotifyUserID'] = $UserID;
         $Activity['Emailed'] = ActivityModel::SENT_PENDING;
         $Activity['HeadlineFormat'] = T('HeadlineFormat.Unban.Notification', "You've been unbanned.");
         $ActivityModel->Queue($Activity, FALSE, array('Force' => TRUE));
         
         $ActivityModel->SaveQueue();
      }
   }