Introduce logging
Change-Id: I5ac91cc195a46d666714904b56e9f89f56f9c2c0
diff --git a/redis.php b/redis.php
index f1cb0c0..edd0f6f 100755
--- a/redis.php
+++ b/redis.php
@@ -1,4 +1,7 @@
<?php
+ include "User.php";
+ use \User as User;
+
//Connecting to Redis server on localhost
function connect(){
include 'config.php';
@@ -11,6 +14,15 @@
$redis = connect();
return json_decode($redis->get($key));
}
+
+ function redis_get_user($key) {
+ $redis = connect();
+ $data = json_decode($redis->get($key));
+ $user = new User($data->user_name, $data->first_name, $data->last_name, $data->email, $data->password, $data->organization);
+
+ return $user;
+ }
+
function redis_set($key, $data, $timeout=null){
$redis = connect();
$redis->set($key, json_encode($data), $timeout);