[Mapbender-commits] r9702 - trunk/mapbender/http/geoportal
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Fri Mar 3 00:33:16 PST 2017
Author: armin11
Date: 2017-03-03 00:33:16 -0800 (Fri, 03 Mar 2017)
New Revision: 9702
Modified:
trunk/mapbender/http/geoportal/insertUserDataIntoDb.php
Log:
Fix for database errors while register users
Modified: trunk/mapbender/http/geoportal/insertUserDataIntoDb.php
===================================================================
--- trunk/mapbender/http/geoportal/insertUserDataIntoDb.php 2017-02-24 12:17:55 UTC (rev 9701)
+++ trunk/mapbender/http/geoportal/insertUserDataIntoDb.php 2017-03-03 08:33:16 UTC (rev 9702)
@@ -72,13 +72,22 @@
$v = array($adm->getUserIdByUserName($mb_user_name), $group_id);
$t = array('i', 'i');
$res = db_prep_query($sql, $v, $t);
- //Mailversand
- $mailBody = $mailBody1.$mb_user_name.$mailBody2.$mb_user_password.$mailBody3;
- $mailBody = iconv("UTF-8", "ISO-8859-1", $mailBody);
- $success = $adm->sendEmail(MAILADMIN, MAILADMINNAME, $mb_user_email, $mb_user_name, 'Ihre Registrierung', $mailBody, $error_msg );
- if (defined("SEND_REGISTRATION_CC") && SEND_REGISTRATION_CC == true ) {
- $success = $adm->sendEmail(MAILADMIN, MAILADMINNAME, MAILADMIN, $mb_user_name, 'Ihre Registrierung', $mailBody, $error_msg );
- }
+ if ($res) {
+ //Mailversand
+ $mailBody = $mailBody1.$mb_user_name.$mailBody2.$mb_user_password.$mailBody3;
+ $mailBody = iconv("UTF-8", "ISO-8859-1", $mailBody);
+ $success = $adm->sendEmail(MAILADMIN, MAILADMINNAME, $mb_user_email, $mb_user_name, 'Ihre Registrierung', $mailBody, $error_msg );
+ if (defined("SEND_REGISTRATION_CC") && SEND_REGISTRATION_CC == true ) {
+ $success = $adm->sendEmail(MAILADMIN, MAILADMINNAME, MAILADMIN, $mb_user_name, 'Ihre Registrierung', $mailBody, $error_msg );
+ }
+ } else {
+ $mailBody = "An error occured while trying to register your user in the Geoportal database. Please contact our support by respond to this message.";
+ $mailBody = iconv("UTF-8", "ISO-8859-1", $mailBody);
+ $success = $adm->sendEmail(MAILADMIN, MAILADMINNAME, $mb_user_email, $mb_user_name, 'Your registration', $mailBody, $error_msg );
+ if (defined("SEND_REGISTRATION_CC") && SEND_REGISTRATION_CC == true ) {
+ $success = $adm->sendEmail(MAILADMIN, MAILADMINNAME, MAILADMIN, $mb_user_name, 'Your registration', $mailBody, $error_msg );
+ }
+ }
}
else
{
More information about the Mapbender_commits
mailing list