Forums | Mahara Community

Developers /
Need help on how to get user type on code


Asish G's profile picture
Posts: 2

30 March 2010, 7:36 AM

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 asish@linxyssolutions.com

Richard Mansfield's profile picture
Posts: 808

30 March 2010, 5:57 PM

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').

Asish G's profile picture
Posts: 2

30 March 2010, 11:47 PM

thank you for your response....will try your code and will respond soon....thanx a lot... :)
3 results