Loading og_homepage.module +18 −0 Original line number Diff line number Diff line Loading @@ -24,12 +24,30 @@ function og_homepage_menu() { } /** * Implements hook_permission(). */ function og_homepage_permission() { return array( 'bypass og homepage redirection' => array( 'title' => t('Bypass OG Homepage redirection'), 'description' => t('Removes redirection from specified roles.'), 'restrict access' => TRUE, ), ); } /** * Implements hook_init(). */ function og_homepage_init() { global $user; if (user_access('bypass og homepage redirection', $user)) { return; } // Check if we have a logged in user and if we are on the front page. if (user_is_logged_in() && drupal_is_front_page()) { // Does this user possess a role which has og_homepage enabled? Loading Loading
og_homepage.module +18 −0 Original line number Diff line number Diff line Loading @@ -24,12 +24,30 @@ function og_homepage_menu() { } /** * Implements hook_permission(). */ function og_homepage_permission() { return array( 'bypass og homepage redirection' => array( 'title' => t('Bypass OG Homepage redirection'), 'description' => t('Removes redirection from specified roles.'), 'restrict access' => TRUE, ), ); } /** * Implements hook_init(). */ function og_homepage_init() { global $user; if (user_access('bypass og homepage redirection', $user)) { return; } // Check if we have a logged in user and if we are on the front page. if (user_is_logged_in() && drupal_is_front_page()) { // Does this user possess a role which has og_homepage enabled? Loading