Questions and answers

How do I add a user to Liferay using API?

How do I add a user to Liferay using API?

creating new user via API

  1. creating a new user: User user = UserLocalServiceUtil.
  2. setting properties for this user (password, companyId, screenName, active,…. )
  3. creating corresponding contact: Contact contact = ContactLocalServiceUtil.
  4. setting contact’s properties (userId, accountId,…)

How do I add a role in Liferay?

Managing Roles in Liferay. Manage Liferay’s roles in the Control Panel (Control Panel → Users → Roles). There you’ll find an application for creating roles, granting them permissions, and assigning users to them.

How do you get a role ID in Liferay?

You can use RoleLocalServiceUtil. getRole(companyId, name) method to get the role object (instance of RoleModel ). If you need the id, call role. getRoleId() .

What are the types of roles available in Liferay?

Roles and Scope

Permission Scope Role Type Available Assignments
A single Organization Organization Individual Users
A single Site Site User Groups Organizations Segments Individual Site Members
A single Asset Library Asset Library Organizations User Groups Individual Users

How do you impersonate someone in Liferay?

Impersonating Users

  1. Click Control Panel → Users and Organizations to see the list of Users and find the one you want to impersonate.
  2. Click that User’s Actions button ( ).
  3. Click Impersonate User.

WHAT IS Organization in Liferay?

An Organization is a way to group Liferay Users hierarchically. For example, your company’s departments (Human Resources, for example) could be an organization in Liferay. Often times, organizations have their own site. The main purpose of organizations is to allow for distributed user management.

How do I find my Liferay User List?

If you want to get users of certain group, you need to call User API: List userList = UserLocalServiceUtil. getUserGroupUsers(long userGroupId, int start, int end); There are other methods as well for userGroupId parameter, you can look at UserLocalServiceUtil for other methods.

What is user in Liferay?

What are Users? In case there’s any confusion over the term, a User in Liferay is an entity that can sign into the portal and do something. Generally a User has more privileges, called Permissions, than a Guest of your site, who does not sign in.

What is the difference between site and an organization in Liferay?

As of Liferay 6.2, sites can be organized hierarchically, just like organizations. The difference between sites and organizations, of course, is that sites are used to organize pages, content, application data, and users (via site memberships) whereas organizations are only used to group users.

WHAT IS organization in Liferay?

What is Organisation in Liferay?

An Organization groups Users hierarchically. The main purpose of Organizations is to enable distributed User management. Portal administrators can delegate some user management responsibilities to Organization administrators.

What is site in Liferay?

A site is a set of pages that can be used to publish content or applications. With Liferay DXP, you can create as many different sites as you like within the context of a single Liferay instance. You can use sites in Liferay DXP to build many different kinds of websites.