]> git.mxchange.org Git - mailer.git/blobdiff - inc/wrapper-functions.php
getUserData() does now tollerate missing table columns. This makes it very flexible...
[mailer.git] / inc / wrapper-functions.php
index db62ffb5d1a7353cc289fb8db39aed55c01af036..00844537956bacb634ef375ee5479089473325bd 100644 (file)
@@ -951,8 +951,16 @@ function getUserData ($column) {
                debug_report_bug(__FUNCTION__, __LINE__, 'Current user id is invalid: ' . getCurrentUserId());
        } // END - if
 
-       // Return the value
-       return $GLOBALS['user_data'][getCurrentUserId()][$column];
+       // Default is empty
+       $data = null;
+
+       if (isset($GLOBALS['user_data'][getCurrentUserId()][$column])) {
+               // Return the value
+               $data = $GLOBALS['user_data'][getCurrentUserId()][$column];
+       } // END - if
+
+       // Return it
+       return $data;
 }
 
 // Checks wether given user data is set to 'Y'