Forums | Mahara Community
Developers
/
Need help on how to get user type on code
30 March 2010, 7:36
Hi all.....Need help on how to get the user type of currently logged in user.My problem is that I need to block copying of views if it is blocked through admin.I had sucessfully done that but my problem is that copying is locked on admin side also....(ie bcoz I cannot check the user type of currently logged in user.I set an option on admin which has a combo box ,to block the copy of views.It has therr values,Copy only for admin,admin and staff and for all.I get the values on template file,on the front end,also).
PM to [email protected]
30 March 2010, 17:57
Hi Asish, what do you mean by "user type"?
If you just want to test whether the logged-in user is an admin or not, you can just call $USER->get('admin').
30 March 2010, 23:47
thank you for your response....will try your code and will respond soon....thanx a lot... :)