diff --git a/.settings/org.eclipse.wst.common.component b/.settings/org.eclipse.wst.common.component
index 398d029..ac95469 100644
--- a/.settings/org.eclipse.wst.common.component
+++ b/.settings/org.eclipse.wst.common.component
@@ -4,7 +4,7 @@
-
+
uses
diff --git a/distro/changelog.xml b/distro/changelog.xml
index 0e9dea6..a2b7928 100644
--- a/distro/changelog.xml
+++ b/distro/changelog.xml
@@ -8,4 +8,7 @@
Fixed a bug concerning users with no google+ available where the authenticated response did not include given and family names
+
+ Feature #11432, D4Science Gateway user registration: confirmation email is sent upon new user registration via Google or LinkedIn SSO
+
diff --git a/pom.xml b/pom.xml
index 6622903..80a63cf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -19,7 +19,7 @@
The Google hook allows users to login with their Google credentials to a liferay portal
- 1.2.0-SNAPSHOT
+ 1.3.0-SNAPSHOT
scm:svn:http://svn.cite.gr/code-bluebridge/google-hook
diff --git a/src/main/java/gr/cite/google/GoogleOAuth.java b/src/main/java/gr/cite/google/GoogleOAuth.java
index 53b1741..757e58e 100644
--- a/src/main/java/gr/cite/google/GoogleOAuth.java
+++ b/src/main/java/gr/cite/google/GoogleOAuth.java
@@ -102,7 +102,9 @@ public class GoogleOAuth extends BaseStrutsAction {
session.setAttribute(GoogleConstantVariables.USER_EMAIL_ADDRESS_FOR_SESSION_GOOGLE, user.getEmailAddress());
}else if (canCreateAccount){
- LoginHookEssentialMethods.addUser(session, themeDisplay.getCompanyId(), googleUserInfo);
+ long groupId = PortalUtil.getScopeGroupId(request);
+ String portalURL = PortalUtil.getPortalURL(request, true);
+ LoginHookEssentialMethods.addUser(groupId, portalURL, session, themeDisplay.getCompanyId(), googleUserInfo);
user = UserLocalServiceUtil.getUserById(UserLocalServiceUtil.getUserByEmailAddress(themeDisplay.getCompanyId(), googleUserInfo.getEmail()).getUserId());
}else{
try{
diff --git a/src/main/java/gr/cite/google/util/LoginHookEssentialMethods.java b/src/main/java/gr/cite/google/util/LoginHookEssentialMethods.java
index 270fcc7..0824538 100644
--- a/src/main/java/gr/cite/google/util/LoginHookEssentialMethods.java
+++ b/src/main/java/gr/cite/google/util/LoginHookEssentialMethods.java
@@ -29,6 +29,7 @@ import com.liferay.portal.model.User;
import com.liferay.portal.service.ServiceContext;
import com.liferay.portal.service.UserLocalServiceUtil;
import com.liferay.portal.theme.ThemeDisplay;
+import com.liferay.portal.util.PortalUtil;
import com.liferay.portal.util.PortletKeys;
import com.liferay.portlet.PortletURLFactoryUtil;
@@ -47,7 +48,7 @@ public class LoginHookEssentialMethods {
* @return User
* @throws SystemException, PortalException, EmailAddressException
*/
- public static User addUser(HttpSession session, long companyId, GoogleJson googleJson) throws PortalException, SystemException {
+ public static User addUser(long groupId, String portalURL, HttpSession session, long companyId, GoogleJson googleJson) throws PortalException, SystemException {
User user = null;
@@ -87,6 +88,9 @@ public class LoginHookEssentialMethods {
boolean sendEmail = true;
ServiceContext serviceContext = new ServiceContext();
+ serviceContext.setScopeGroupId(groupId);
+ serviceContext.setPortalURL(portalURL);
+ serviceContext.setPathMain("/c");
try{
user = UserLocalServiceUtil.addUser(creatorUserId, companyId,
diff --git a/src/main/webapp/WEB-INF/liferay-plugin-package.properties b/src/main/webapp/WEB-INF/liferay-plugin-package.properties
index 7c1a0d3..9ca09a2 100644
--- a/src/main/webapp/WEB-INF/liferay-plugin-package.properties
+++ b/src/main/webapp/WEB-INF/liferay-plugin-package.properties
@@ -1,9 +1,9 @@
name=Google
module-group-id=liferay
-module-incremental-version=1
+module-incremental-version=2
tags=
short-description=
change-log=
-page-url=http://www.liferay.com
-author=Liferay, Inc.
-licenses=LGPL
\ No newline at end of file
+page-url=http://www.gcube-system.org
+author=M. Nikolopoulos, M. Assante
+licenses=EUPS