mirror of
https://github.com/e107inc/e107.git
synced 2025-10-22 10:16:03 +02:00
Replaced deprecated get_user_data() with e107::user()
This commit is contained in:
@@ -70,7 +70,7 @@ class e107
|
||||
* Used for runtime caching of user extended struct
|
||||
*
|
||||
* @var array
|
||||
* @see get_user_data()
|
||||
* @see e107::user()
|
||||
*/
|
||||
public $extended_struct;
|
||||
|
||||
@@ -1428,7 +1428,9 @@ class e107
|
||||
*/
|
||||
public static function user($uid=null)
|
||||
{
|
||||
if(!$uid){ return false; }
|
||||
$uid = intval($uid);
|
||||
|
||||
if(empty($uid)){ return false; }
|
||||
|
||||
$user = self::getSystemUser($uid, true);
|
||||
$var = array();
|
||||
|
||||
@@ -2883,7 +2883,7 @@ class e_parser
|
||||
else
|
||||
{
|
||||
$log = e107::getAdminLog();
|
||||
$log->addDebug('Broken Icon Path: '.$legacyPath, false)->save('IMALAN_00');
|
||||
$log->addDebug('Broken Icon Path: '.$legacyPath."\n".print_r(debug_backtrace(null,2), true), false)->save('IMALAN_00');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -206,7 +206,7 @@ class e_ranks
|
||||
}
|
||||
else
|
||||
{
|
||||
$userData = e107::getSystemUser($userId)->getData(); //get_user_data($userId);
|
||||
$userData = e107::getSystemUser($userId)->getData(); //get_usXer_data($userId);
|
||||
}
|
||||
|
||||
if($userData['user_admin'])
|
||||
|
||||
@@ -3249,7 +3249,7 @@ class e_form
|
||||
|
||||
/*if(is_numeric($value))
|
||||
{
|
||||
$value = get_user_data($value);
|
||||
$value = e107::user($value);
|
||||
if($value)
|
||||
{
|
||||
$value = $value[$attributes['type']] ? $value[$attributes['type']] : $value['user_name'];
|
||||
@@ -3781,7 +3781,7 @@ class e_form
|
||||
|
||||
if(!is_array($value))
|
||||
{
|
||||
$value = $value ? e107::getSystemUser($value, true)->getUserData() : array();// get_user_data($value);
|
||||
$value = $value ? e107::getSystemUser($value, true)->getUserData() : array();// e107::user($value);
|
||||
}
|
||||
|
||||
$colname = vartrue($parms['nameType'], 'user_name');
|
||||
|
||||
@@ -25,7 +25,7 @@ if (!defined('e107_INIT')) { exit; }
|
||||
* @todo: - change some routines to access the cached variables rather than DB
|
||||
* @todo: Remove setting up of _FIELD_TYPES array (may be necessary, since UEF data structure not fixed)
|
||||
* @todo: Consider changing field type constants to class constants
|
||||
* @todo - cache field structure (already done in a different way in get_user_data() in class2.php line 1387 or so)
|
||||
* @todo - cache field structure (already done in a different way in e107::user() in class2.php line 1387 or so)
|
||||
* @todo - class variables - confirm whether public/protected assignments are correct
|
||||
* @todo - consider whether to split system and non-system fields
|
||||
|
||||
@@ -1036,7 +1036,7 @@ class e107_user_extended
|
||||
{
|
||||
$field_name = 'user_'.$field_name;
|
||||
}
|
||||
$uinfo = get_user_data($uid);
|
||||
$uinfo = e107::user($uid);
|
||||
if (!isset($uinfo[$field_name])) return $ifnotset;
|
||||
return $uinfo[$field_name];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user