From 372eadd0d969f5dcc88ba8bc053ee58bff2baf90 Mon Sep 17 00:00:00 2001 From: Daniel Date: Fri, 20 May 2016 05:19:58 +0200 Subject: [PATCH] Hopefully fixing the avatar bug. --- .gitignore | 1 + app/models/User.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 98146ab..7912f3b 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ composer.phar composer.lock .DS_Store /app/config/app.php +/public/img/avatars/* diff --git a/app/models/User.php b/app/models/User.php index a83e17a..489ee42 100644 --- a/app/models/User.php +++ b/app/models/User.php @@ -69,7 +69,7 @@ class User extends Eloquent implements UserInterface, RemindableInterface { public function setSetting($key, $value) { $settings = json_decode($this->settings); - if(!is_null($settings)) { + if(is_null($settings)) { $settings = array(); } $settings[$key] = $value; @@ -91,4 +91,4 @@ class User extends Eloquent implements UserInterface, RemindableInterface { public function news() { return $this->hasMany('News', 'author'); } -} \ No newline at end of file +}