]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/register_functions.php
Renamed ifSqlHasZeroNums() to ifSqlHasZeroNumRows() and improved some queries.
[mailer.git] / inc / libs / register_functions.php
index 0880221a1a256411cbc0b90fe9461517cabf695b..1bb911df8f768f3c49a57e1e3748c19517f88dc8 100644 (file)
@@ -16,7 +16,7 @@
  * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
  * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2013 by Mailer Developer Team                   *
+ * Copyright (c) 2009 - 2015 by Mailer Developer Team                   *
  * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
  * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -98,7 +98,7 @@ ORDER BY
        `sort` ASC',
                __FUNCTION__, __LINE__);
 
        `sort` ASC',
                __FUNCTION__, __LINE__);
 
-       if (!ifSqlHasZeroNums($result)) {
+       if (!ifSqlHasZeroNumRows($result)) {
                // List alle visible modules (or all to the admin)
                $OUT .= '<table border="0" cellspacing="0" cellpadding="0" width="100%">';
                while ($content = sqlFetchArray($result)) {
                // List alle visible modules (or all to the admin)
                $OUT .= '<table border="0" cellspacing="0" cellpadding="0" width="100%">';
                while ($content = sqlFetchArray($result)) {
@@ -328,6 +328,14 @@ function doGenericUserRegistration () {
                return FALSE;
        } // END - if
 
                return FALSE;
        } // END - if
 
+       // These elements must be set
+       assert(isset($GLOBALS['register_country_row']));
+       assert(isset($GLOBALS['register_country_data']));
+       assert(isset($GLOBALS['register_confirm_hash']));
+
+       // Only comment this in if you develop
+       //* DEVELOPER-CODE: */ $GLOBALS['register_userid'] = 1; return TRUE;
+
        // Create user's account...
        sqlQueryEscaped("INSERT INTO
        `{?_MYSQL_PREFIX?}_user_data`
        // Create user's account...
        sqlQueryEscaped("INSERT INTO
        `{?_MYSQL_PREFIX?}_user_data`
@@ -411,6 +419,9 @@ function doGenericUserRegistration () {
                return FALSE;
        } // END - if
 
                return FALSE;
        } // END - if
 
+       // Set new user id globally
+       $GLOBALS['register_userid'] = $filterData['register_insert_id'];
+
        // Shall we reset random refid? Only possible with latest ext-user
        if (isExtensionInstalledAndNewer('user', '0.3.4')) {
                // Reset all accounts, registration is done
        // Shall we reset random refid? Only possible with latest ext-user
        if (isExtensionInstalledAndNewer('user', '0.3.4')) {
                // Reset all accounts, registration is done