Permalink
Browse files

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

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