X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmysql-manager.php;h=890392a5b0a96b45798dce52efc1e32f3bc6fd9f;hb=64d07c28338c2b08687ff394235101c79cd3077f;hp=4ffb8e4167a311c7647a452fdcfad9e74266d3ea;hpb=2bda7ccdfd87b065a61ff976b5f9e98e46f73591;p=mailer.git diff --git a/inc/mysql-manager.php b/inc/mysql-manager.php index 4ffb8e4167..890392a5b0 100644 --- a/inc/mysql-manager.php +++ b/inc/mysql-manager.php @@ -11,9 +11,9 @@ * Kurzbeschreibung : Alle MySQL-Relevanten Funktionen * * -------------------------------------------------------------------- * * $Revision:: 856 $ * - * $Date:: 2009-03-06 20:24:32 +0100 (Fr, 06. Mär 2009) $ * + * $Date:: $ * * $Tag:: 0.2.1-FINAL $ * - * $Author:: stelzi $ * + * $Author:: $ * * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * @@ -629,10 +629,10 @@ function IS_MEMBER () { FIX_DELETED_COOKIES(array('userid', 'u_hash')); // Are cookies set? - if ((!empty($GLOBALS['userid'])) && (isSessionVariableSet('u_hash'))) { + if ((isUserIdSet()) && (isSessionVariableSet('u_hash'))) { // Cookies are set with values, but are they valid? $result = SQL_QUERY_ESC("SELECT password, status, last_module, last_online FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", - array($GLOBALS['userid']), __FUNCTION__, __LINE__); + array(getUserId()), __FUNCTION__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Load data from cookies list($password, $status, $mod, $onl) = SQL_FETCHROW($result); @@ -761,7 +761,7 @@ function SEND_MODE_MAILS($mod, $modes) { // Load hash $result_main = SQL_QUERY_ESC("SELECT password FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s AND `status`='CONFIRMED' LIMIT 1", - array($GLOBALS['userid']), __FUNCTION__, __LINE__); + array(getUserId()), __FUNCTION__, __LINE__); if (SQL_NUMROWS($result_main) == 1) { // Load hash from database list($hashDB) = SQL_FETCHROW($result_main); @@ -774,7 +774,7 @@ function SEND_MODE_MAILS($mod, $modes) { if (($hash == get_session('u_hash')) || (REQUEST_POST('pass1') == REQUEST_POST('pass2'))) { // Load user's data $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($GLOBALS['userid'], $hashDB), __FUNCTION__, __LINE__); + array(getUserId(), $hashDB), __FUNCTION__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Load the data $DATA = SQL_FETCHROW($result); @@ -818,7 +818,7 @@ function SEND_MODE_MAILS($mod, $modes) { } // END - if // Load template - $msg = LOAD_EMAIL_TEMPLATE("member_mydata_notify", $content, $GLOBALS['userid']); + $msg = LOAD_EMAIL_TEMPLATE("member_mydata_notify", $content, getUserId()); if (getConfig('admin_notify') == "Y") { // The admin needs to be notified about a profile change @@ -865,7 +865,7 @@ function SEND_MODE_MAILS($mod, $modes) { if (empty($content)) { if ((!empty($sub_adm)) && (!empty($msg_admin))) { // Send admin mail - SEND_ADMIN_NOTIFICATION($sub_adm, $msg_admin, $content, $GLOBALS['userid']); + SEND_ADMIN_NOTIFICATION($sub_adm, $msg_admin, $content, getUserId()); } elseif (getConfig('admin_notify') == "Y") { // Cannot send mails to admin! $content = getMessage('CANNOT_SEND_ADMIN_MAILS'); @@ -1990,8 +1990,8 @@ function USER_STATS_GET_TIMESTAMP ($type, $data, $uid = 0) { $stamp = 0; // User id set? - if ((isset($GLOBALS['userid'])) && ($uid == 0)) { - $uid = $GLOBALS['userid']; + if ((isUserIdSet()) && ($uid == 0)) { + $uid = getUserId(); } // END - if // Is the extension installed and updated?