Created
September 22, 2016 07:52
-
-
Save csakiistvan/340bef16c1b22a892eaf0ed02c7742c1 to your computer and use it in GitHub Desktop.
Redirect drupal user to url, if he/she has a specific role
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @file | |
* Code for the My custom module. | |
*/ | |
/** | |
* Implements hook_user_login(). | |
*/ | |
function mymodule_user_login(&$edit, $account) { | |
if (in_array('Press', $account->roles)) { | |
drupal_goto('press'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment