Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-27607

Potential issue in the profile front end when displaying the description

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Minor Minor
    • None
    • 2.0.3
    • Performance
    • MOODLE_20_STABLE

      The following code is use to display the description in /user/profile.php:

      if ($user->description && !isset($hiddenfields['description'])) {
          if (!empty($CFG->profilesforenrolledusersonly) && !$currentuser && !$DB->record_exists('role_assignments', array('userid'=>$user->id))) {
              echo get_string('profilenotshown', 'moodle');
          } else {
              $user->description = file_rewrite_pluginfile_urls($user->description, 'pluginfile.php', $usercontext->id, 'user', 'profile', null);
              $options = array('overflowdiv'=>true);
              echo format_text($user->description, $user->descriptionformat, $options);
          }
      }

      It seems strange to check into the role_assignements table. What is the reason?

            Unassigned Unassigned
            jerome Jérôme Mouneyrac
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.