Feature #11293 Update Invite and Create user portlets to skip Email Confirmation
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/admin/create-users@164546 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
a00d6b05a4
commit
39f0448615
|
@ -1,12 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" output="target/create-users-2.4.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
|
||||
<classpathentry kind="src" output="target/create-users-2.5.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
|
||||
<attributes>
|
||||
<attribute name="optional" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry excluding="**" kind="src" output="target/create-users-2.4.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
|
||||
<classpathentry excluding="**" kind="src" output="target/create-users-2.5.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
|
@ -34,5 +34,5 @@
|
|||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="com.google.gwt.eclipse.core.GWT_CONTAINER"/>
|
||||
<classpathentry kind="output" path="target/create-users-2.4.0-SNAPSHOT/WEB-INF/classes"/>
|
||||
<classpathentry kind="output" path="target/create-users-2.5.0-SNAPSHOT/WEB-INF/classes"/>
|
||||
</classpath>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
||||
<dependent-module archiveName="email-templates-library-1.0.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/email-templates-library/email-templates-library">
|
||||
<dependent-module archiveName="email-templates-library-1.2.1-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/email-templates-library/email-templates-library">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
<dependent-module archiveName="gcube-widgets-2.2.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/gcube-widgets/gcube-widgets">
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
<ReleaseNotes>
|
||||
<Changeset component="org.gcube.portlets.admin.create-users.2-5-0">
|
||||
<Change>The created account now automatic set email as verified
|
||||
</Change>
|
||||
</Changeset>
|
||||
<Changeset component="org.gcube.portlets.admin.create-users.2-4-0"
|
||||
date="2017-05-17">
|
||||
<Change>Ported to Java8</Change>
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -13,7 +13,7 @@
|
|||
<groupId>org.gcube.portlets.admin</groupId>
|
||||
<artifactId>create-users</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<version>2.4.0-SNAPSHOT</version>
|
||||
<version>2.5.0-SNAPSHOT</version>
|
||||
<name>Create users portlet</name>
|
||||
<description>
|
||||
Create users portlet allows a VRE-Manager to enter user's personal data and automatically register he/she in the portal.
|
||||
|
|
|
@ -9,8 +9,6 @@ import java.util.ArrayList;
|
|||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import javax.mail.internet.InternetAddress;
|
||||
|
||||
import org.gcube.common.portal.PortalContext;
|
||||
import org.gcube.portal.mailing.message.Recipient;
|
||||
import org.gcube.portal.mailing.service.EmailTemplateService;
|
||||
|
@ -31,7 +29,6 @@ import com.google.gwt.user.server.rpc.RemoteServiceServlet;
|
|||
import com.liferay.portal.kernel.dao.jdbc.DataAccess;
|
||||
import com.liferay.portal.kernel.exception.PortalException;
|
||||
import com.liferay.portal.kernel.exception.SystemException;
|
||||
import com.liferay.portal.kernel.mail.MailMessage;
|
||||
import com.liferay.portal.kernel.util.GetterUtil;
|
||||
import com.liferay.portal.kernel.util.PropsUtil;
|
||||
import com.liferay.portal.model.Company;
|
||||
|
@ -251,7 +248,9 @@ public class CreateUsersImpl extends RemoteServiceServlet implements HandleUsers
|
|||
true); // force the password reset
|
||||
|
||||
// adding to the current VRE
|
||||
userManager.assignUserToGroup(getCurrentGroupID(), userManager.getUserId(user.getUsername()));
|
||||
long userId = userManager.getUserId(user.getUsername());
|
||||
userManager.assignUserToGroup(getCurrentGroupID(), userId);
|
||||
UserLocalServiceUtil.updateEmailAddressVerified(userId, true);
|
||||
if (sendEmail)
|
||||
sendEmailToUser(email);
|
||||
|
||||
|
|
Loading…
Reference in New Issue