mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 07:53:39 +01:00
* Preferences - Add 'Firstname Lastname (Primary Group)' and 'Lastname, Firstname (Primary Group)' as account display options
This commit is contained in:
parent
00885da412
commit
f8c742cdbb
@ -325,10 +325,12 @@ class Accounts
|
||||
{
|
||||
case 'firstname':
|
||||
case 'firstall':
|
||||
case 'firstgroup':
|
||||
$order = 'account_firstname,account_lastname';
|
||||
break;
|
||||
case 'lastname':
|
||||
case 'lastall':
|
||||
case 'firstgroup':
|
||||
$order = 'account_lastname,account_firstname';
|
||||
break;
|
||||
default:
|
||||
@ -492,6 +494,14 @@ class Accounts
|
||||
case 'allfirst':
|
||||
$name = '['.$lid.'] ' . $firstname . ' ' . $lastname;
|
||||
break;
|
||||
case 'firstgroup':
|
||||
$group = Accounts::id2name($lid, 'account_primary_group');
|
||||
$name = $firstname . ' ' . $lastname . ($is_group ? '' : ' ('.Accounts::id2name($group).')');
|
||||
break;
|
||||
case 'lastgroup':
|
||||
$group = Accounts::id2name($lid, 'account_primary_group');
|
||||
$name = $lastname . $delimiter . $firstname . ($is_group ? '' : ' ('.Accounts::id2name($group).')');
|
||||
break;
|
||||
case 'all':
|
||||
/* fall through */
|
||||
default:
|
||||
|
@ -86,6 +86,8 @@ class preferences_hooks
|
||||
'lastall' => lang('Lastname').', '.lang('Firstname').' ['.lang('username').']',
|
||||
'allfirst' => '['.lang('username').'] '.lang('Firstname').' '.lang('Lastname'),
|
||||
'all' => '['.lang('username').'] '.lang('Lastname').','.lang('Firstname'),
|
||||
'firstgroup'=> lang('Firstname').' '.lang('Lastname').' ('.lang('primary group').')',
|
||||
'lastgroup' => lang('Lastname').', '.lang('Firstname').' ('.lang('primary group').')',
|
||||
);
|
||||
|
||||
if ($hook_data['setup']) // called via setup
|
||||
|
Loading…
Reference in New Issue
Block a user