Created
April 24, 2012 09:13
-
-
Save mudrd8mz/2478155 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/outputcomponents.php b/lib/outputcomponents.php | |
index 918b693..3652010 100644 | |
--- a/lib/outputcomponents.php | |
+++ b/lib/outputcomponents.php | |
@@ -340,13 +340,14 @@ class user_picture implements renderable { | |
// picture of not. | |
if (!empty($this->user->deleted) or !$context = context_user::instance($this->user->id, IGNORE_MISSING)) { | |
$hasuploadedfile = false; | |
+ } else if ($this->user->picture == 1) { | |
+ $hasuploadedfile = true; | |
} else { | |
- $fs = get_file_storage(); | |
- $hasuploadedfile = ($fs->file_exists($context->id, 'user', 'icon', 0, '/', $filename.'/.png') || $fs->file_exists($context->id, 'user', 'icon', 0, '/', $filename.'/.jpg')); | |
+ $hasuploadedfile = false; | |
} | |
$imageurl = $renderer->pix_url('u/'.$filename); | |
- if ($hasuploadedfile && $this->user->picture == 1) { | |
+ if ($hasuploadedfile) { | |
$path = '/'; | |
if (clean_param($page->theme->name, PARAM_THEME) == $page->theme->name) { | |
// We append the theme name to the file path if we have it so that |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment