By El Bandito on
Hi
I have implemented a form_alter function in my template.php but I only want the changes to apply if the user is NOT the admin user. Would anyone be so kind as to show me how to test a global variable to see if the admin user is logged on ?
Thanks
Dave
Comments
Try this code
As admin user will always have user id 1. We check that the current logged in user has user id 1 or not. If not than you can execute your code.
This will solve your issue.
- Mittal Patel
http://www.MittalPatel.co.in
http://www.TriCoreITSolutions.com
By admin do you mean, the
By admin do you mean, the logged in person is not user 1 or do you have roles?
Thanks
As usual the Drupal community delivers. Works perfectly.
Cheers
Dave