Skip to Content
0
Former Member
Oct 13, 2005 at 09:07 AM

Check to see if user belongs to a role

57 Views

Hi all

Im witing some code to see if user belongs to a specific role..thou it does not seem to run this code..

What is the correct way?

This is what i have done?

	
IUser user = (IUser) request.getUser().getUser();
if(user.isInRole("com_x_quicklinks")){
 MenuItem t = new MenuItem("mi" + (i + 2), "test");
 mb.addMenuItem(t);
}

Message was edited by: rinx