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

Users who are not in a group can not see their own profile

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 1.4.3
    • Fix Version/s: None
    • Component/s: Administration
    • Labels:
      None
    • Environment:
      All
    • Affected Branches:
      MOODLE_14_STABLE

      Description

      Users who are not in a group can not see their own profile in courses that are set to seperate groups. To fix this I wrapped the following code on line 61 of user\view.php with if(!$currentuser) so that if you are trying to view your own profile it will let you see it, regardless of if you are in a group or not!

      if(!$currentuser){

      if (!isteacheredit($course->id, $user->id) and !ismember(mygroupid($course->id), $user->id))

      { print_header($personalprofile: , $personalprofile: , <a href=\../course/view.php?id=$course->id\>$course->shortname</a> -> <a href=\index.php?id=$course->id\>$participants</a>, , , true, ?, navmenu($course)); error(get_string(groupnotamember), ../course/view.php?id=$course->id); }

      }

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: