Fórum

"Add user" portlet

prajeesh karat, modificado 8 Anos atrás.

"Add user" portlet

New Member Mensagem: 1 Data de Entrada: 16/02/15 Postagens Recentes
Currently for admin, to add user one has to go to control panel and then go to users to add up new user. I want a portlet where with one click to a button, new user registration open comes up
thumbnail
Jitendra Rajput, modificado 8 Anos atrás.

RE: "Add user" portlet

Liferay Master Postagens: 875 Data de Entrada: 07/01/11 Postagens Recentes
You can use create account functionality available in login portlet to create new user from page instead of control panel.

If you want user admin portlet to be available in page then you will have to do several changes in liferay-portlet.xml , liferay-display.xml and in portal.xml using ext.

Basically you will have to provide ADD_TO_PAGE permission so that user admin will be accessible in add application menu.

Thank you,
Jitendra
Anjaneya Eswarappa, modificado 8 Anos atrás.

RE: "Add user" portlet

Junior Member Postagens: 49 Data de Entrada: 18/11/14 Postagens Recentes
I Have a requirement where in i need to add user portlet to my own public page . Please share the steps
thumbnail
David H Nebinger, modificado 8 Anos atrás.

RE: "Add user" portlet

Liferay Legend Postagens: 14916 Data de Entrada: 02/09/06 Postagens Recentes
1. create form.
2. create action handler for form.
3. extract parameter values.
4. invoke liferay api to add user.
Hassan Bakri, modificado 8 Anos atrás.

RE: "Add user" portlet

New Member Postagens: 4 Data de Entrada: 18/06/15 Postagens Recentes
David H Nebinger:
1. create form.
2. create action handler for form.
3. extract parameter values.
4. invoke liferay api to add user.



hi
i have requirement so the users don't have to enter their first name and other features (which is mandatory by default system portlet ) my question is if i did the above instructions do i can bypass the checking forced by the system in("\html\portlet\login\create_account.jsp")
thumbnail
David H Nebinger, modificado 8 Anos atrás.

RE: "Add user" portlet

Liferay Legend Postagens: 14916 Data de Entrada: 02/09/06 Postagens Recentes
You can try to bypass the checks in that jsp page, but your insert will fail. Required fields are just that, required.
thumbnail
Meera Prince, modificado 8 Anos atrás.

RE: "Add user" portlet

Liferay Legend Postagens: 1111 Data de Entrada: 08/02/11 Postagens Recentes
HI
Best way is create custom portlet and use portal API to add user in the database


Regards,
Meera Prince
thumbnail
Ravi Kumar Gupta, modificado 8 Anos atrás.

RE: "Add user" portlet

Liferay Legend Postagens: 1302 Data de Entrada: 24/06/09 Postagens Recentes
Prajeesh,

Agree with Meera here. Creating a custom portlet is an easy and fast option here. I do similar to this when I need to create multiple users for testing.

Assuming that you want admin to escape filling forms every time a user is to be created and need bulk user creation..
Alternatively you can also check this portlet if it helps. https://www.liferay.com/marketplace/-/mp/application/33064852
This portlet imports users from csv file.
thumbnail
Nitin Yeola, modificado 8 Anos atrás.

RE: "Add user" portlet

Junior Member Postagens: 64 Data de Entrada: 16/01/14 Postagens Recentes
There are liferay API you can use in your portlet like
- UserLocalServiceUtil.addUser(params)
Check the details for paramameter in API

Regards
Nitin
thumbnail
Nikhil Nishchal, modificado 8 Anos atrás.

RE: "Add user" portlet

Regular Member Postagens: 176 Data de Entrada: 22/06/12 Postagens Recentes
Yes you can use Liferay API for user creation and what ever data you can pass from form you can pass other wise you can put it by code or with some random text.
Hassan Bakri, modificado 8 Anos atrás.

RE: "Add user" portlet

New Member Postagens: 4 Data de Entrada: 18/06/15 Postagens Recentes
yup they are just required but that frees you form their validation too (The bright side emoticon )