- $this->id = $user['id'];
- $this->username = $user['username'];
- $this->name = $user['name'];
- $this->password = $user['password'];
- $this->email = $user['email'];
- $this->config = $user['config'];
+ if ($user != array()) {
+ $this->id = $user['id'];
+ $this->username = $user['username'];
+ $this->name = $user['name'];
+ $this->password = $user['password'];
+ $this->email = $user['email'];
+ $this->config = $user['config'];
+ }