aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/poche/User.class.php
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas.loeuillet@gmail.com>2013-08-06 15:51:48 +0200
committerNicolas LÅ“uillet <nicolas.loeuillet@gmail.com>2013-08-06 15:51:48 +0200
commit8d3275bee488d058c6ff0efe6e81d20a584d3709 (patch)
tree80b82707b6aecc5e29fa72cbdcf8ffe76ba8b7b4 /inc/poche/User.class.php
parent7ce7ec4c942e0a3567858ad0ec8e654000b49a3f (diff)
downloadwallabag-8d3275bee488d058c6ff0efe6e81d20a584d3709.tar.gz
wallabag-8d3275bee488d058c6ff0efe6e81d20a584d3709.tar.zst
wallabag-8d3275bee488d058c6ff0efe6e81d20a584d3709.zip
multi user
Diffstat (limited to 'inc/poche/User.class.php')
-rw-r--r--inc/poche/User.class.php33
1 files changed, 25 insertions, 8 deletions
diff --git a/inc/poche/User.class.php b/inc/poche/User.class.php
index ef47730f..6dac7839 100644
--- a/inc/poche/User.class.php
+++ b/inc/poche/User.class.php
@@ -17,17 +17,34 @@ class User
17 public $email; 17 public $email;
18 public $config; 18 public $config;
19 19
20 function __construct($user) 20 function __construct($user = array())
21 { 21 {
22 $this->id = $user['id']; 22 if ($user != array()) {
23 $this->username = $user['username']; 23 $this->id = $user['id'];
24 $this->name = $user['name']; 24 $this->username = $user['username'];
25 $this->password = $user['password']; 25 $this->name = $user['name'];
26 $this->email = $user['email']; 26 $this->password = $user['password'];
27 $this->config = $user['config']; 27 $this->email = $user['email'];
28 $this->config = $user['config'];
29 }
28 } 30 }
29 31
30 function getConfigValue($name) { 32 public function getId()
33 {
34 return $this->id;
35 }
36
37 public function getUsername()
38 {
39 return $this->username;
40 }
41
42 public function setConfig($config)
43 {
44 $this->config = $config;
45 }
46
47 public function getConfigValue($name) {
31 return (isset($this->config[$name])) ? $this->config[$name] : FALSE; 48 return (isset($this->config[$name])) ? $this->config[$name] : FALSE;
32 } 49 }
33} \ No newline at end of file 50} \ No newline at end of file