]> git.immae.eu Git - github/wallabag/wallabag.git/blame - inc/poche/User.class.php
Merge branch 'dev' into data-for-mysql
[github/wallabag/wallabag.git] / inc / poche / User.class.php
CommitLineData
7ce7ec4c
NL
1<?php
2/**
c95b78a8 3 * wallabag, self hostable application allowing you to not miss any content anymore
7ce7ec4c 4 *
c95b78a8
NL
5 * @category wallabag
6 * @author Nicolas Lœuillet <nicolas@loeuillet.org>
7ce7ec4c 7 * @copyright 2013
3602405e 8 * @license http://opensource.org/licenses/MIT see COPYING file
7ce7ec4c
NL
9 */
10
11class User
12{
13 public $id;
14 public $username;
15 public $name;
16 public $password;
17 public $email;
18 public $config;
19
8d3275be 20 function __construct($user = array())
7ce7ec4c 21 {
8d3275be
NL
22 if ($user != array()) {
23 $this->id = $user['id'];
24 $this->username = $user['username'];
25 $this->name = $user['name'];
26 $this->password = $user['password'];
27 $this->email = $user['email'];
28 $this->config = $user['config'];
29 }
7ce7ec4c
NL
30 }
31
8d3275be
NL
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
3602405e
NL
47 /**
48 * Returns configuration entry for a user
49 *
50 * @param $name
51 * @return bool
52 */
53 public function getConfigValue($name)
54 {
7ce7ec4c
NL
55 return (isset($this->config[$name])) ? $this->config[$name] : FALSE;
56 }
57}