MDL-29844 Administration: Added new config for users to login for viewing profile image
This commit is contained in:
committed by
Rajesh Taneja
parent
ddb7ae2f3c
commit
ff542e5e11
+3
-1
@@ -302,8 +302,10 @@ if ($component === 'blog') {
|
||||
$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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user