mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
MDL-35644 user_get_details: admin should be able to see description
This commit is contained in:
parent
a3ab18c735
commit
acf6459645
16
user/lib.php
16
user/lib.php
@ -334,15 +334,13 @@ function user_get_user_details($user, $course = null, array $userfields = array(
|
||||
$userdetails['phone2'] = $user->phone2;
|
||||
}
|
||||
|
||||
if (isset($user->description) && (!isset($hiddenfields['description']) or $isadmin)) {
|
||||
if (!$cannotviewdescription) {
|
||||
|
||||
if (in_array('description', $userfields)) {
|
||||
// Always return the descriptionformat if description is requested.
|
||||
list($userdetails['description'], $userdetails['descriptionformat']) =
|
||||
external_format_text($user->description, $user->descriptionformat,
|
||||
$usercontext->id, 'user', 'profile', null);
|
||||
}
|
||||
if (isset($user->description) &&
|
||||
((!isset($hiddenfields['description']) && !$cannotviewdescription) or $isadmin)) {
|
||||
if (in_array('description', $userfields)) {
|
||||
// Always return the descriptionformat if description is requested.
|
||||
list($userdetails['description'], $userdetails['descriptionformat']) =
|
||||
external_format_text($user->description, $user->descriptionformat,
|
||||
$usercontext->id, 'user', 'profile', null);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user