MDL-38289: Custom profile fields - added unit test

Added a unit test to cover the case when you are fetching a custom
profile field but you are not logged in.
This commit is contained in:
Damyon Wiese
2013-05-09 10:29:51 +08:00
parent 8cfc9d75ed
commit e9df9e8f7a
2 changed files with 10 additions and 1 deletions
+1 -1
View File
@@ -1325,7 +1325,7 @@ abstract class condition_info_base {
$iscurrentuser = $USER->id == $userid;
if (isguestuser($userid) || ($iscurrentuser && !isloggedin())) {
// Must be logged in and can't be the guest. (this should never happen anyway)
// Must be logged in and can't be the guest. (e.g. front page)
return false;
}