Commit fc4612a8 authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review

Merge "Bug 1745278: check user is logged in for publicly viewable groups"

parents d2d903e2 65f6e575
......@@ -409,7 +409,7 @@ class PluginBlocktypeGroupViews extends MaharaCoreBlocktype {
}
if ($group->submittableto) {
if ($group->submittableto && $USER->is_logged_in()) {
// A user can submit more than one view to the same group, but no view can be
// submitted to more than one group.
......
......@@ -1908,6 +1908,8 @@ function get_new_profile_urlid($desired) {
function profile_url($user, $full=true, $useid=false) {
$wantclean = !$useid && get_config('cleanurls');
$urlid = null;
$id = null;
if ($user instanceof User) {
$id = $user->get('id');
$urlid = $wantclean ? $user->get('urlid') : null;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment