You are here

function hook_front_page_alter in Front Page 7.2

Hook to alert the front page data before setting is triggered.

If there is any custom logic, this can be used to have custom redirec path.

This hook gets invoked only when there is valid entry in the admin settings page. If 'skip' is set as option for any role, then this won't get invoked.

1 invocation of hook_front_page_alter()
front_page_init in ./front_page.module
Implements hook_init().

File

./front_page.api.php, line 18
It has all the lists of the hook documentation that other module can implement.

Code

function hook_front_page_alter(&$front_page) {
  if ($front_page['mode'] == 'redirect' && in_array('customer user', array_values($account->roles)) && $account->login_page == 'reports') {
    $front_page['path'] = 'user/reports';
  }
}