You are here

function customerroralt_code in Customerror 7

Returm replacement code.

If 403, and user is logged in, return a 'code' to replace the one used by customerror in the last steps.

2 calls to customerroralt_code()
customerror_page in ./customerror.module
Returns the content to display on the the 403 or 404 error page.
customerror_page_title in ./customerror.module
Return the page title associated to the customerror code.

File

customerroralt/customerroralt.module, line 69
Enables custom 403 (access denied) pages for authenticated users in Drupal.

Code

function customerroralt_code($code) {
  if (user_is_logged_in() && 403 == $code) {
    return $code . '_authenticated';
  }
  return $code;
}