Permalink
Browse files

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

…dle into MOODLE_19_STABLE
  • Loading branch information...
2 parents 5753b2d + 4ed1199 commit 15624257cb0020ece67f2d33fae2ff4416d2ca1a @nebgor nebgor committed Jan 4, 2012
Showing with 7 additions and 2 deletions.
  1. +1 −0 admin/settings/security.php
  2. +2 −0 lang/en_utf8/admin.php
  3. +3 −1 user/pix.php
  4. +1 −1 version.php
@@ -8,6 +8,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));
$max_upload_choices = get_max_upload_sizes();
View
@@ -396,6 +396,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';
View
@@ -6,8 +6,10 @@
require_once('../config.php');
require_once($CFG->libdir.'/filelib.php');
- 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($CFG->pixpath.'/u/f1.png');
}
View
@@ -6,7 +6,7 @@
// This is compared against the values stored in the database to determine
// whether upgrades should be performed (see lib/db/*.php)
- $version = 2007101591.08; // YYYYMMDD = date of the 1.9 branch (don't change)
+ $version = 2007101591.09; // YYYYMMDD = date of the 1.9 branch (don't change)
// X = release number 1.9.[0,1,2,3,4,5...]
// Y.YY = micro-increments between releases

0 comments on commit 1562425

Please sign in to comment.