mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-59172 user: user_can_view_profile() now checks viewalldetails cap
This commit is contained in:
parent
8146b1f06d
commit
4d068a6708
4 changed files with 12 additions and 3 deletions
|
@ -135,8 +135,7 @@ if (empty($result->posts)) {
|
|||
// In either case we need to decide whether we can show personal information
|
||||
// about the requested user to the current user so we will execute some checks
|
||||
|
||||
// TODO - Remove extra cap check once MDL-59172 is resolved.
|
||||
$canviewuser = user_can_view_profile($user, null, $usercontext) || has_capability('moodle/user:viewalldetails', $usercontext);
|
||||
$canviewuser = user_can_view_profile($user, null, $usercontext);
|
||||
|
||||
// Prepare the page title
|
||||
$pagetitle = get_string('noposts', 'mod_forum');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue