[Mapbender-commits] r10303 - in trunk/mapbender/http: classes php

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Mon Oct 28 05:57:51 PDT 2019


Author: armin11
Date: 2019-10-28 05:57:50 -0700 (Mon, 28 Oct 2019)
New Revision: 10303

Modified:
   trunk/mapbender/http/classes/class_user.php
   trunk/mapbender/http/php/mod_createUser.php
Log:
Add send mail function for activation key

Modified: trunk/mapbender/http/classes/class_user.php
===================================================================
--- trunk/mapbender/http/classes/class_user.php	2019-10-28 10:18:36 UTC (rev 10302)
+++ trunk/mapbender/http/classes/class_user.php	2019-10-28 12:57:50 UTC (rev 10303)
@@ -522,16 +522,15 @@
 	
 	public function sendUserLoginMail () {
 		$admin = new administration();
-		$userMessage = "Your Mapbender login data:\n";
+		$userMessage = "Activation mail for Mapbender Geoportal\n";
 		$userMessage .= "Your login name is: ".$this->name."\n";
-		$userMessage .= "Please set your password using the following link: \n";
-		$mbUrl = substr(LOGIN, 0, -9);
-		//$userMessage .= $mbUrl."../javascripts/mod_confirmLogin.php?user_id=".$this->id."&user_name=".$this->name."&user_ticket=".$this->passwordTicket."\n";
-		$userMessage .= $mbUrl."../php/mod_activateUserAccount?activationKey=".$this->activation_key."\n";
+		$userMessage .= "Please activate your account by click on following link: \n";
+		$mbUrl = MAPBENDER_PATH."/";
+		$userMessage .= $mbUrl."php/mod_activateUserAccount.php?activationKey=".$this->activation_key."\n";
 		$userMessage .= "Follow this link to login to Mapbender: \n";
 		$userMessage .= LOGIN."\n";
 		$userMail = $admin->getEmailByUserId($this->id);
-		if(!$admin->sendEmail("", "", $userMail, $this->name, utf8_decode("Your Mapbender account"), utf8_decode($userMessage), $error_msg)) {
+		if(!$admin->sendEmail("", "", $userMail, $this->name, utf8_decode("Your Mapbender Geoportal account"), utf8_decode($userMessage), $error_msg)) {
 			return "Registry data could not be send. Please check mail address.";
 		}
 		return "Registry data has been sent successfully.";

Modified: trunk/mapbender/http/php/mod_createUser.php
===================================================================
--- trunk/mapbender/http/php/mod_createUser.php	2019-10-28 10:18:36 UTC (rev 10302)
+++ trunk/mapbender/http/php/mod_createUser.php	2019-10-28 12:57:50 UTC (rev 10303)
@@ -159,6 +159,9 @@
 		$v = array($new_guiId1[0],$new_guiId2[0],$new_guiId3[0],$new_guiId4[0]);
 		$t = array('s','s','s','s');
 		$res_del_from_group = db_prep_query($sql_del_from_group,$v,$t);	 
+		//send mail with activation key to user!
+		$user->sendUserLoginMail();
+		echo "<script language='JavaScript'>alert('Email with activation key has been sent!');</script>";
 	}
 }
 



More information about the Mapbender_commits mailing list