Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'wip-mdl-29844-m20' of git://github.com/rajeshtaneja/moo…

…dle into MOODLE_20_STABLE
  • Loading branch information...
commit 9238b568c52bf81e7c8e75210f863fb87245e756 2 parents e9d36fd + 4b16342
Aparup Banerjee nebgor authored
1  admin/settings/security.php
View
@@ -16,6 +16,7 @@
$temp->add(new admin_setting_configcheckbox('protectusernames', get_string('protectusernames', 'admin'), get_string('configprotectusernames', 'admin'), 1));
$temp->add(new admin_setting_configcheckbox('forcelogin', get_string('forcelogin', 'admin'), get_string('configforcelogin', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('forceloginforprofiles', get_string('forceloginforprofiles', 'admin'), get_string('configforceloginforprofiles', 'admin'), 1));
+ $temp->add(new admin_setting_configcheckbox('forceloginforprofileimage', get_string('forceloginforprofileimage', 'admin'), get_string('forceloginforprofileimage_help', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('opentogoogle', get_string('opentogoogle', 'admin'), get_string('configopentogoogle', 'admin'), 0));
$temp->add(new admin_setting_pickroles('profileroles',
get_string('profileroles','admin'),
2  lang/en/admin.php
View
@@ -548,6 +548,8 @@
$string['filtersettingsgeneral'] = 'General filter settings';
$string['filteruploadedfiles'] = 'Filter uploaded files';
$string['forcelogin'] = 'Force users to login';
+$string['forceloginforprofileimage'] = 'Force users to login to view user pictures';
+$string['forceloginforprofileimage_help'] = 'If enabled, users must login in order to view user profile pictures and the default user picture will be used in all notification emails.';
$string['forceloginforprofiles'] = 'Force users to login for profiles';
$string['forcetimezone'] = 'Force default timezone';
$string['framename'] = 'Frame name';
4 lib/outputcomponents.php
View
@@ -276,8 +276,10 @@ public function get_url(moodle_page $page, renderer_base $renderer = null) {
$renderer = $page->get_renderer('core');
}
- if (!empty($CFG->forcelogin) and !isloggedin()) {
+ if ((!empty($CFG->forcelogin) and !isloggedin()) ||
+ (!empty($CFG->forceloginforprofileimage) && (!isloggedin() || isguestuser()))) {
// protect images if login required and not logged in;
+ // also if login is required for profile images and is not logged in or guest
// do not use require_login() because it is expensive and not suitable here anyway
return $renderer->pix_url('u/f1');
}
4 pluginfile.php
View
@@ -302,8 +302,10 @@
$themename = array_shift($args);
$filename = array_shift($args);
}
- if ((!empty($CFG->forcelogin) and !isloggedin())) {
+ if ((!empty($CFG->forcelogin) and !isloggedin()) ||
+ (!empty($CFG->forceloginforprofileimage) && (!isloggedin() || isguestuser()))) {
// protect images if login required and not logged in;
+ // also if login is required for profile images and is not logged in or guest
// do not use require_login() because it is expensive and not suitable here anyway
$redirect = true;
}
2  version.php
View
@@ -30,7 +30,7 @@
defined('MOODLE_INTERNAL') || die();
-$version = 2011033006.05; // 20110330 = branching date YYYYMMDD - do not modify!
+$version = 2011033006.06; // 20110330 = branching date YYYYMMDD - do not modify!
// RR = release version - do not change in weeklies
// .XX = incremental changes
Please sign in to comment.
Something went wrong with that request. Please try again.