]> git.mxchange.org Git - mailer.git/blobdiff - inc/mysql-manager.php
A lot email templates renamed, SQL fixed:
[mailer.git] / inc / mysql-manager.php
index e1ed9ac4ea24b8b7f0b521a8dc84e74adb107acb..2c7ea72a2b1512901cb5122b5a4592531b11577c 100644 (file)
@@ -444,8 +444,11 @@ function fetchUserData ($value, $column = 'userid') {
                        // Use cache, so it is fine
                        return true;
                }
-       } elseif ((isUserDataValid()) || (!isExtensionActive('user'))) {
-               // Using cache or absend ext-user is fine here
+       } elseif (!isExtensionActive('user')) {
+               // Absent ext-user is really not good
+               return false;
+       } elseif (isUserDataValid())  {
+               // Using cache is fine
                return true;
        }
 
@@ -1124,7 +1127,7 @@ function addPointsThroughReferalSystem ($subject, $userid, $points, $sendNotify
                                );
 
                                // Load email template
-                               $message = loadEmailTemplate('confirm-referal', $content, bigintval($userid));
+                               $message = loadEmailTemplate('guest_user_confirmed_referal', $content, bigintval($userid));
 
                                // Send email
                                sendEmail($userid, '{--THANX_REFERAL_ONE_SUBJECT--}', $message);
@@ -1136,7 +1139,7 @@ function addPointsThroughReferalSystem ($subject, $userid, $points, $sendNotify
                                );
 
                                // Load message
-                               $message = loadEmailTemplate('add-points', $content, $userid);
+                               $message = loadEmailTemplate('member_add_points', $content, $userid);
 
                                // And sent it away
                                sendEmail($userid, '{--DIRECT_PAYMENT_SUBJECT--}', $message);
@@ -1387,7 +1390,7 @@ function getAdminEmail ($adminId) {
 // Get default ACL  of admin id
 function getAdminDefaultAcl ($adminId) {
        // By default an invalid ACL value is returned
-       $data['default_acl'] = '***';
+       $data['default_acl'] = 'NO-ACL';
 
        // Is sql_patches there and was it found in cache?
        if (!isExtensionActive('sql_patches')) {
@@ -1403,6 +1406,8 @@ function getAdminDefaultAcl ($adminId) {
                // Load from database
                $result_admin_id = SQL_QUERY_ESC("SELECT `default_acl` FROM `{?_MYSQL_PREFIX?}_admins` WHERE `id`=%s LIMIT 1",
                        array(bigintval($adminId)), __FUNCTION__, __LINE__);
+
+               // Do we have an entry?
                if (SQL_NUMROWS($result_admin_id) == 1) {
                        // Fetch data
                        $data = SQL_FETCHARRAY($result_admin_id);
@@ -1590,7 +1595,7 @@ LIMIT 1",
        $data['text']   = $reason;
 
        // Now a mail to the user and that's all...
-       $message = loadEmailTemplate('del-user', $data, $userid);
+       $message = loadEmailTemplate('member_user_deleted', $data, $userid);
        sendEmail($userid, '{--ADMIN_DELETE_ACCOUNT--}', $message);
 
        // Ok, delete the account!