X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Flibs%2Fregister_functions.php;h=215cf54410f3f12c01ec4781fb7e432731a53daa;hb=refs%2Fheads%2F0.2.1-FINAL;hp=f0bd6cd97f9ed50b64e73e1f9d29628232e1858c;hpb=6b1e55213d76a67e9aa3d9f1e4dcb55e0bbf12ee;p=mailer.git diff --git a/inc/libs/register_functions.php b/inc/libs/register_functions.php index f0bd6cd97f..215cf54410 100644 --- a/inc/libs/register_functions.php +++ b/inc/libs/register_functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2013 by Mailer Developer Team * + * Copyright (c) 2009 - 2016 by Mailer Developer Team * * 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__); - if (!ifSqlHasZeroNums($result)) { + if (!ifSqlHasZeroNumRows($result)) { // List alle visible modules (or all to the admin) $OUT .= ''; while ($content = sqlFetchArray($result)) { @@ -130,7 +130,7 @@ ORDER BY } // Outputs a 'failed message' -function registerOutputFailedMessage ($messageId, $extra='') { +function registerOutputFailedMessage ($messageId, $extra = '') { if (empty($messageId)) { outputHtml('
' . $extra . '
'); } else { @@ -328,11 +328,19 @@ function doGenericUserRegistration () { 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` ( - `gender`, + `sex`, `surname`, `family`, `street_nr`, @@ -380,7 +388,7 @@ function doGenericUserRegistration () { )", array( $GLOBALS['register_country_row'], - substr(postRequestElement('gender'), 0, 1), + substr(postRequestElement('sex'), 0, 1), postRequestElement('surname'), postRequestElement('family'), postRequestElement('street_nr'), @@ -411,6 +419,9 @@ function doGenericUserRegistration () { 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 @@ -468,7 +479,7 @@ function doGenericUserRegistration () { $content = array( 'hash' => $GLOBALS['register_confirm_hash'], 'userid' => $filterData['register_insert_id'], - 'gender' => sqlEscapeString(postRequestElement('gender')), + 'sex' => sqlEscapeString(postRequestElement('sex')), 'surname' => sqlEscapeString(postRequestElement('surname')), 'family' => sqlEscapeString(postRequestElement('family')), 'email' => sqlEscapeString(postRequestElement('email')), @@ -484,7 +495,7 @@ function doGenericUserRegistration () { $content = array( 'hash' => $GLOBALS['register_confirm_hash'], 'userid' => $filterData['register_insert_id'], - 'gender' => sqlEscapeString(postRequestElement('gender')), + 'sex' => sqlEscapeString(postRequestElement('sex')), 'surname' => sqlEscapeString(postRequestElement('surname')), 'family' => sqlEscapeString(postRequestElement('family')), 'email' => sqlEscapeString(postRequestElement('email')),