]> git.mxchange.org Git - mailer.git/blobdiff - inc/mysql-manager.php
Naming inconsistencies for userid fixed
[mailer.git] / inc / mysql-manager.php
index e1f912c95f6c9bf33c12dba11e2e974c75dfcd02..9c0e40109c51376d3086e06529441b1641349167 100644 (file)
@@ -580,12 +580,12 @@ function isMember () {
        if (isset($GLOBALS['is_member'])) {
                // Then return it
                return $GLOBALS['is_member'];
-       } elseif (getUserId() == 0) {
+       } elseif (getMemberId() == 0) {
                // No member
                return false;
        } else {
                // Transfer userid=>current
-               setCurrentUserid(getUserId());
+               setCurrentUserid(getMemberId());
        }
 
        // Init global user data array
@@ -595,9 +595,9 @@ function isMember () {
        fixDeletedCookies(array('userid', 'u_hash'));
 
        // Are cookies set?
-       if ((isUserIdSet()) && (isSessionVariableSet('u_hash'))) {
+       if ((isMemberIdSet()) && (isSessionVariableSet('u_hash'))) {
                // Cookies are set with values, but are they valid?
-               if (fetchUserData(getUserId()) === true) {
+               if (fetchUserData(getMemberId()) === true) {
                        // Validate password by created the difference of it and the secret key
                        $valPass = generatePassString(getUserData('password'));
 
@@ -612,17 +612,17 @@ function isMember () {
                        } else {
                                // Maybe got locked etc.
                                //* DEBUG: */ print(__LINE__."!!!<br />");
-                               destroyUserSession();
+                               destroyMemberSession();
                        }
                } else {
                        // Cookie data is invalid!
                        //* DEBUG: */ print(__LINE__."***<br />");
-                       destroyUserSession();
+                       destroyMemberSession();
                }
        } else {
                // Cookie data is invalid!
                //* DEBUG: */ print(__LINE__."///<br />");
-               destroyUserSession();
+               destroyMemberSession();
        }
 
        // Cache status
@@ -896,7 +896,7 @@ function isMenuActionValid ($mode, $action, $what, $updateEntry=false) {
 // @TODO Lame description for this function
 function sendModeMails ($mod, $modes) {
        // Load hash
-       if (fetchUserData(getUserId())) {
+       if (fetchUserData(getMemberId())) {
                // Extract salt from cookie
                $salt = substr(getSession('u_hash'), 0, -40);
 
@@ -907,7 +907,7 @@ function sendModeMails ($mod, $modes) {
                if (($hash == getSession('u_hash')) || (postRequestElement('pass1') == postRequestElement('pass2'))) {
                        // Load user's data               0        1        2         3        4      5    6      7
                        $result = SQL_QUERY_ESC("SELECT gender, surname, family, street_nr, country, zip, city, email FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid`=%s AND password='%s' LIMIT 1",
-                               array(getUserId(), getUserData('password')), __FUNCTION__, __LINE__);
+                               array(getMemberId(), getUserData('password')), __FUNCTION__, __LINE__);
                        if (SQL_NUMROWS($result) == 1) {
                                // Load the data
                                $content = SQL_FETCHARRAY($result, 0, false);
@@ -950,7 +950,7 @@ function sendModeMails ($mod, $modes) {
                                                $content = merge_array($content, postRequestArray());
 
                                                // Load template
-                                               $message = loadEmailTemplate('member_mydata_notify', $content, getUserId());
+                                               $message = loadEmailTemplate('member_mydata_notify', $content, getMemberId());
 
                                                if (getConfig('admin_notify') == 'Y') {
                                                        // The admin needs to be notified about a profile change
@@ -997,7 +997,7 @@ function sendModeMails ($mod, $modes) {
        if (empty($content)) {
                if ((!empty($sub_adm)) && (!empty($message_admin))) {
                        // Send admin mail
-                       sendAdminNotification($sub_adm, $message_admin, $content, getUserId());
+                       sendAdminNotification($sub_adm, $message_admin, $content, getMemberId());
                } elseif (getConfig('admin_notify') == 'Y') {
                        // Cannot send mails to admin!
                        $content = getMessage('CANNOT_SEND_ADMIN_MAILS');
@@ -2054,8 +2054,8 @@ function getTimestampFromUserStats ($type, $data, $userid = 0) {
        $stamp = 0;
 
        // User id set?
-       if ((isUserIdSet()) && ($userid == 0)) {
-               $userid = getUserId();
+       if ((isMemberIdSet()) && ($userid == 0)) {
+               $userid = getMemberId();
        } // END - if
 
        // Is the extension installed and updated?