MDL-31776 - lib: Alternate name fields
Add support for additional name fields and flexible formating of user names.
This commit is contained in:
committed by
Damyon Wiese
parent
9d871499fe
commit
a327f25ef1
@@ -131,7 +131,8 @@ class user_picture implements renderable {
|
||||
* @var array List of mandatory fields in user record here. (do not include
|
||||
* TEXT columns because it would break SELECT DISTINCT in MSSQL and ORACLE)
|
||||
*/
|
||||
protected static $fields = array('id', 'picture', 'firstname', 'lastname', 'imagealt', 'email');
|
||||
protected static $fields = array('id', 'picture', 'firstname', 'lastname', 'firstnamephonetic', 'lastnamephonetic',
|
||||
'middlename', 'alternatename', 'imagealt', 'email');
|
||||
|
||||
/**
|
||||
* @var stdClass A user object with at least fields all columns specified
|
||||
@@ -224,7 +225,6 @@ class user_picture implements renderable {
|
||||
if ($tableprefix) {
|
||||
$tableprefix .= '.';
|
||||
}
|
||||
$fields = array();
|
||||
foreach (self::$fields as $field) {
|
||||
if ($field === 'id' and $idalias and $idalias !== 'id') {
|
||||
$fields[$field] = "$tableprefix$field AS $idalias";
|
||||
|
||||
Reference in New Issue
Block a user