public function unlockemails() { if ($this->canSeeEmailAddresses()) { // User can already see email addresses. // Redirect back to guestboook. return $this->redirect($this->Link()); } // Force a login if no spam protection module exists. if (Form::has_extension('FormSpamProtectionExtension') == false) { return Security::permissionFailure($this, _t('GuestbookController.EMAILPROTECTIONLOGIN', "You must be logged in to see email addresses.")); } // Use spam protection module return $this; }