Friday, 24 November 2017

Assign roles programmatically

Role role = RoleLocalServiceUtil.getRole(company.getCompanyId(), usery[0]);
         UserLocalServiceUtil.addRoleUser(role.getRoleId(), user.getUserId());
         UserLocalServiceUtil.updateUser(user);

TEST

I am Java Developer. I have 6 year Experiance in this field and like to post in blogging. So keep sharing and like my post

0 comments:

Post a Comment

 

Copyright @ 2017 Liferay Article.