mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 04:22:07 +02:00
MDL-41307 - tags: Update of the user object for fullname function.
This commit is contained in:
parent
838d78a9ff
commit
506c8d59ee
@ -595,8 +595,9 @@ class blog_listing {
|
||||
$userid = $USER->id;
|
||||
}
|
||||
|
||||
$allnamefields = get_all_user_name_fields(true, 'u');
|
||||
// The query used to locate blog entries is complicated. It will be built from the following components:
|
||||
$requiredfields = "p.*, u.firstname, u.lastname, u.email"; // the SELECT clause
|
||||
$requiredfields = "p.*, $allnamefields, u.email"; // the SELECT clause
|
||||
$tables = array('p' => 'post', 'u' => 'user'); // components of the FROM clause (table_id => table_name)
|
||||
$conditions = array('u.deleted = 0', 'p.userid = u.id', '(p.module = \'blog\' OR p.module = \'blog_external\')'); // components of the WHERE clause (conjunction)
|
||||
|
||||
|
@ -225,9 +225,10 @@ if ($where) {
|
||||
$where = 'WHERE '. $where;
|
||||
}
|
||||
|
||||
$allusernames = get_all_user_name_fields(true, 'u');
|
||||
$query = "
|
||||
SELECT tg.id, tg.name, tg.rawname, tg.tagtype, tg.flag, tg.timemodified,
|
||||
u.id AS owner, u.firstname, u.lastname,
|
||||
u.id AS owner, $allusernames,
|
||||
COUNT(ti.id) AS count
|
||||
FROM {tag} tg
|
||||
LEFT JOIN {tag_instance} ti ON ti.tagid = tg.id
|
||||
|
Loading…
x
Reference in New Issue
Block a user