By oliveyrc on
Hello all,
Is there any way to get Drupal to forward you to the /user page if you try and visit /user/register once logged in? I don't really like the way you end up seeing 'access denied' errors.
Many Thanks
Rich
Hello all,
Is there any way to get Drupal to forward you to the /user page if you try and visit /user/register once logged in? I don't really like the way you end up seeing 'access denied' errors.
Many Thanks
Rich
Comments
Don't hack Core, but, erm....
I wouldn't normally advocate hacking Core at all but sometimes when you want a quick fix...
This would normally be done in a module but if you want an "instant fix" alter index.php like this:-
Where it's got :-
Add in this code...
Not a pretty fix by any means but it'll do what you want. Or you could create a simple module to do it, for example:-
does pretty much the same thing without a Core hack shown eariler.
Hope that helps
many thanks for that, I've
many thanks for that, I've got a custom module so I've put it in that and its done the trick.
Gonna extend it slightly to include others too, /user/password for example, stored in an array and then do an in_array check on the end
Rich