mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
Merge branch 'MDL-47238_guest' of https://github.com/andyjdavis/moodle
This commit is contained in:
commit
546acfbf67
2 changed files with 9 additions and 1 deletions
|
@ -262,6 +262,7 @@ $string['groupnotaddedtogroupingerror'] = 'Group "{$a->groupname}" not added to
|
||||||
$string['groupingnotaddederror'] = 'Grouping "{$a}" not added';
|
$string['groupingnotaddederror'] = 'Grouping "{$a}" not added';
|
||||||
$string['groupunknown'] = 'Group {$a} not associated to specified course';
|
$string['groupunknown'] = 'Group {$a} not associated to specified course';
|
||||||
$string['groupusernotmember'] = 'User is not member of this group.';
|
$string['groupusernotmember'] = 'User is not member of this group.';
|
||||||
|
$string['guestcantaccessprofiles'] = 'Guests cannot access user profiles. Log in with a full user account to continue.';
|
||||||
$string['guestnocomment'] = 'Guests are not allowed to post comments!';
|
$string['guestnocomment'] = 'Guests are not allowed to post comments!';
|
||||||
$string['guestnoeditprofile'] = 'The guest user cannot edit their profile';
|
$string['guestnoeditprofile'] = 'The guest user cannot edit their profile';
|
||||||
$string['guestnoeditprofileother'] = 'The guest user profile cannot be edited';
|
$string['guestnoeditprofileother'] = 'The guest user profile cannot be edited';
|
||||||
|
|
|
@ -49,7 +49,14 @@ if (!empty($CFG->forceloginforprofiles)) {
|
||||||
require_login();
|
require_login();
|
||||||
if (isguestuser()) {
|
if (isguestuser()) {
|
||||||
$SESSION->wantsurl = $PAGE->url->out(false);
|
$SESSION->wantsurl = $PAGE->url->out(false);
|
||||||
redirect(get_login_url());
|
|
||||||
|
$PAGE->set_context(context_system::instance());
|
||||||
|
echo $OUTPUT->header();
|
||||||
|
echo $OUTPUT->confirm(get_string('guestcantaccessprofiles', 'error'),
|
||||||
|
get_login_url(),
|
||||||
|
$CFG->wwwroot);
|
||||||
|
echo $OUTPUT->footer();
|
||||||
|
die;
|
||||||
}
|
}
|
||||||
} else if (!empty($CFG->forcelogin)) {
|
} else if (!empty($CFG->forcelogin)) {
|
||||||
require_login();
|
require_login();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue