mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-13 17:38:19 +01:00
When getting account data via AJAX, make sure account name is in user's preferred format.
This commit is contained in:
parent
71bd17628d
commit
48d779a337
@ -2432,10 +2432,23 @@ abstract class egw_framework
|
|||||||
{
|
{
|
||||||
foreach($account_id < 0 && $_resolve_groups ?
|
foreach($account_id < 0 && $_resolve_groups ?
|
||||||
$GLOBALS['egw']->accounts->members($account_id, true) : array($account_id) as $account_id)
|
$GLOBALS['egw']->accounts->members($account_id, true) : array($account_id) as $account_id)
|
||||||
|
{
|
||||||
|
// Make sure name is formatted according to preference
|
||||||
|
if($_field == 'account_fullname')
|
||||||
|
{
|
||||||
|
$list[$account_id] = common::display_fullname(
|
||||||
|
$GLOBALS['egw']->accounts->id2name($account_id, 'lid'),
|
||||||
|
$GLOBALS['egw']->accounts->id2name($account_id, 'account_firstname'),
|
||||||
|
$GLOBALS['egw']->accounts->id2name($account_id, 'account_lastname'),
|
||||||
|
$account_id
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
$list[$account_id] = $GLOBALS['egw']->accounts->id2name($account_id, $_field);
|
$list[$account_id] = $GLOBALS['egw']->accounts->id2name($account_id, $_field);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
egw_json_response::get()->data($list);
|
egw_json_response::get()->data($list);
|
||||||
return $list;
|
return $list;
|
||||||
|
Loading…
Reference in New Issue
Block a user