]> git.immae.eu Git - github/wallabag/wallabag.git/blame - src/Wallabag/Wallabag/User.php
new folders
[github/wallabag/wallabag.git] / src / Wallabag / Wallabag / User.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
6ad93dff
NL
11namespace Wallabag\Wallabag;
12
7ce7ec4c
NL
13class User
14{
15 public $id;
16 public $username;
17 public $name;
18 public $password;
19 public $email;
20 public $config;
21
8d3275be 22 function __construct($user = array())
7ce7ec4c 23 {
8d3275be
NL
24 if ($user != array()) {
25 $this->id = $user['id'];
26 $this->username = $user['username'];
27 $this->name = $user['name'];
28 $this->password = $user['password'];
29 $this->email = $user['email'];
30 $this->config = $user['config'];
31 }
7ce7ec4c
NL
32 }
33
8d3275be
NL
34 public function getId()
35 {
36 return $this->id;
37 }
38
39 public function getUsername()
40 {
41 return $this->username;
42 }
43
44 public function setConfig($config)
45 {
46 $this->config = $config;
47 }
48
3602405e
NL
49 /**
50 * Returns configuration entry for a user
51 *
52 * @param $name
53 * @return bool
54 */
55 public function getConfigValue($name)
56 {
7ce7ec4c
NL
57 return (isset($this->config[$name])) ? $this->config[$name] : FALSE;
58 }
59}