Browse Source

Hopefully fixing the avatar bug.

Daniel 8 years ago
parent
commit
372eadd0d9
2 changed files with 3 additions and 2 deletions
  1. 1 0
      .gitignore
  2. 2 2
      app/models/User.php

+ 1 - 0
.gitignore

@@ -4,3 +4,4 @@ composer.phar
 composer.lock
 .DS_Store
 /app/config/app.php
+/public/img/avatars/*

+ 2 - 2
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');
 	}
-}
+}