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

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Mon Oct 28 06:19:42 PDT 2019


Author: armin11
Date: 2019-10-28 06:19:42 -0700 (Mon, 28 Oct 2019)
New Revision: 10304

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

Modified: trunk/mapbender/http/classes/class_administration.php
===================================================================
--- trunk/mapbender/http/classes/class_administration.php	2019-10-28 12:57:50 UTC (rev 10303)
+++ trunk/mapbender/http/classes/class_administration.php	2019-10-28 13:19:42 UTC (rev 10304)
@@ -129,7 +129,11 @@
 			}
 			$mail->IsSMTP();                  // set mailer to use SMTP
 			$mail->Host = $mailHost;          // specify main and backup server
-			$mail->setFrom($fromAddr,$fromName);
+                        if (strpos($phpversion, "7.") === 0) {
+			        //$mail->setFrom($fromAddr,$fromName);
+			} else {
+				$mail->setFrom($fromAddr,$fromName);
+			}
 			$mail->AddAddress($toAddr, $toName);
 			#$mail->AddReplyTo("info at ccgis.de", "Information");
 

Modified: trunk/mapbender/http/classes/class_user.php
===================================================================
--- trunk/mapbender/http/classes/class_user.php	2019-10-28 12:57:50 UTC (rev 10303)
+++ trunk/mapbender/http/classes/class_user.php	2019-10-28 13:19:42 UTC (rev 10304)
@@ -526,7 +526,7 @@
 		$userMessage .= "Your login name is: ".$this->name."\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 .= $mbUrl."php/mod_activateUserAccount.php?activationKey=".$this->activationKey."\n";
 		$userMessage .= "Follow this link to login to Mapbender: \n";
 		$userMessage .= LOGIN."\n";
 		$userMail = $admin->getEmailByUserId($this->id);

Modified: trunk/mapbender/http/php/mod_createUser.php
===================================================================
--- trunk/mapbender/http/php/mod_createUser.php	2019-10-28 12:57:50 UTC (rev 10303)
+++ trunk/mapbender/http/php/mod_createUser.php	2019-10-28 13:19:42 UTC (rev 10304)
@@ -160,7 +160,8 @@
 		$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();
+		$userNew = new User($selected_user);
+		$userNew->sendUserLoginMail();
 		echo "<script language='JavaScript'>alert('Email with activation key has been sent!');</script>";
 	}
 }



More information about the Mapbender_commits mailing list