New naming convention applied to many functions, see #118 for details
[mailer.git] / inc / modules / sponsor / account.php
index ba9a45360eacd2a846a7aecfd604492b7b4281b0..cb46839d0a31873e14dc3e0bd80e98ef86a7b62c 100644 (file)
@@ -54,21 +54,21 @@ gender, surname, family, street_nr1, street_nr2, zip, city, country,
 phone, fax, cell, email, url,
 status, receive_warnings
 FROM `{!_MYSQL_PREFIX!}_sponsor_data`
-WHERE id='%s' AND password='%s' LIMIT 1",
-       array(bigintval(get_session('sponsorid')), get_session('sponsorpass')), __FILE__, __LINE__);
+WHERE `id`='%s' AND password='%s' LIMIT 1",
+       array(bigintval(getSession('sponsorid')), getSession('sponsorpass')), __FILE__, __LINE__);
 
 // Entry found?
 if (SQL_NUMROWS($result) == 1) {
        // Load sponsor data
        $content = SQL_FETCHARRAY($result);
-       if ($content['status'] == "CONFIRMED") {
+       if ($content['status'] == 'CONFIRMED') {
                // Check if form was submitted or not
                if (IS_FORM_SENT()) {
                        // Check passwords
                        if (!REQUEST_ISSET_POST(('pass_old'))) {
                                // No current password entered
                                $message = getMessage('SPONSOR_NO_CURRENT_PASSWORD_ENTERED');
-                       } elseif (md5(REQUEST_POST('pass_old')) != get_session('sponsorpass')) {
+                       } elseif (md5(REQUEST_POST('pass_old')) != getSession('sponsorpass')) {
                                // Entered password didn't match password in DB
                                $message = getMessage('SPONSOR_CURRENT_PASSWORD_DIDNOT_MATCH_DB');
                        } elseif ((REQUEST_ISSET_POST(('pass1'))) && (REQUEST_ISSET_POST(('pass2'))) && (REQUEST_POST('pass1') != REQUEST_POST('pass2'))) {
@@ -144,12 +144,12 @@ if (SQL_NUMROWS($result) == 1) {
                }
        } else {
                // Locked or so?
-               $STATUS = SPONSOR_TRANSLATE_STATUS($content['status']);
+               $STATUS = sponsorTranslateUserStatus($content['status']);
                $OUT = LOAD_TEMPLATE('admin_settings_saved', true, sprintf(getMessage('SPONSOR_ACCOUNT_FAILED'), $STATUS));
        }
 } else {
        // Sponsor account not found!
-       $OUT = LOAD_TEMPLATE('admin_settings_saved', true, sprintf(getMessage('SPONSOR_ACCOUNT_404'), get_session('sponsorid')));
+       $OUT = LOAD_TEMPLATE('admin_settings_saved', true, sprintf(getMessage('SPONSOR_ACCOUNT_404'), getSession('sponsorid')));
 }
 
 // Free memory