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 | |
/** | |
* Implements hook_form_alter(). | |
* | |
* Redirects user logins to the front page. | |
*/ | |
function HOOK_form_user_login_alter(&$form, &$form_state) { | |
$form['#action'] = url('user', array('query' => array('destination' => '<front>'))); | |
} |
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
// For 403 @ /admin/settings/customerror | |
// Title: Access Denied | |
<?php global $user; // http://www.kinetasystems.com/blog/creating-custom-error-pages-in-drupal ?> | |
<?php if ($user->uid): ?> | |
<p>Sorry <?php print $user->name; ?>, you don't have permission to view the page you've just tried to access.</p> | |
<p>If you feel that you have received this message in error, please | |
<a href="/about">contact us</a> with specific details so that we may review your access to this web site.</p> | |
<p>Thanks</p> | |
<?php else: ?> | |
<p>This page may be available to clients and registered users only. Please select from one of the other options available to you below.</p> |