Hi,
In my set up, I create theme files where I manually check what the user's roles are. If their roles aren't right, I don't allow them to see a certain page.
so like:
global $user;
if ($user->uid = ....) {
//...show stuff...
}
else {
//redirect to a login page, and that login page will redirect them back here.
}
So I know I can use drupal_goto and just redirect them to '/user/login'
But is there a special way to redirect the user to the logintoboggan screen that will, after logging in, redirect the user back to the previous page?
Thanks!
Comments
Comment #1
hunmonk commentedyou need to check out these functions:
drupal_goto()
drupal_get_destination()
find them for your drupal version at http://api.drupal.org