Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'MDL-35644' of git://github.com/mouneyrac/moodle

  • Loading branch information...
commit b69927877349a9cde508e6b2a3c9835b8612287d 2 parents 9a6f115 + acf6459
@stronk7 stronk7 authored
Showing with 7 additions and 9 deletions.
  1. +7 −9 user/lib.php
View
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);
}
}

0 comments on commit b699278

Please sign in to comment.
Something went wrong with that request. Please try again.