mirror of
https://github.com/e107inc/e107.git
synced 2025-08-02 12:48:26 +02:00
Bugtracker #4127 - extended user fields visibility
This commit is contained in:
@@ -32,15 +32,20 @@ if($udata['user_admin'] == 1)
|
||||
$udata['user_class'].= ",".e_UC_ADMIN;
|
||||
}
|
||||
|
||||
if (
|
||||
!check_class($ueStruct["user_".$parms[0]]['user_extended_struct_applicable'], $udata['user_class'])
|
||||
|| !check_class($ueStruct["user_".$parms[0]]['user_extended_struct_read'])
|
||||
|| ($ueStruct["user_".$parms[0]]['user_extended_struct_read'] == e_UC_READONLY && (!ADMIN && $udata['user_id'] != USERID))
|
||||
|| (!ADMIN && substr($ueStruct["user_".$parms[0]]['user_extended_struct_parms'], -1) == 1
|
||||
&& strpos($udata['user_hidden_fields'], "^user_".$parms[0]."^") !== FALSE && $uid != USERID)
|
||||
)
|
||||
|
||||
// Need to pick up the 'miscellaneous' category - anything which isn't in a named category. Have to control visibility on a field by field basis
|
||||
if ($parms[0] != LAN_410)
|
||||
{
|
||||
$ret_cause = 0;
|
||||
if (!check_class($ueStruct["user_".$parms[0]]['user_extended_struct_applicable'], $udata['user_class'])) $ret_cause = 1;
|
||||
if (!check_class($ueStruct["user_".$parms[0]]['user_extended_struct_read'])) $ret_cause = 2;
|
||||
if (($ueStruct["user_".$parms[0]]['user_extended_struct_read'] == e_UC_READONLY && (!ADMIN && $udata['user_id'] != USERID))) $ret_cause = 3;
|
||||
if ((!ADMIN && substr($ueStruct["user_".$parms[0]]['user_extended_struct_parms'], -1) == 1
|
||||
&& strpos($udata['user_hidden_fields'], "^user_".$parms[0]."^") !== FALSE && $uid != USERID)) $ret_cause = 4;
|
||||
if ($ret_cause != 0)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if($parms[1] == 'text_value')
|
||||
|
Reference in New Issue
Block a user