user_name -> username
Change-Id: I2cb601f7e0eeb36a27e9dad662f3554a0092ab18
diff --git a/redis.php b/redis.php
index 11333ff..323a74b 100755
--- a/redis.php
+++ b/redis.php
@@ -19,7 +19,10 @@
$redis = connect();
$data = json_decode($redis->get($key));
if ($data && gettype($data) == "object") {
- $user = new User($data->user_name, $data->first_name, $data->last_name, $data->email, $data->password, $data->organization);
+ $user = new User();
+ foreach ($data as $key => $value) $user->{$key} = $value;
+ if (isset($data->password)) $user->set_password($data->password);
+ #$user = new User($data->username, $data->first_name, $data->last_name, $data->email, $data->password, $data->organization);
return $user;
} else {
return null;