-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathUserInterface.php
More file actions
100 lines (85 loc) · 1.88 KB
/
UserInterface.php
File metadata and controls
100 lines (85 loc) · 1.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<?php
/**
* Definition of UserInterface
*
* @copyright 2015-today Justso GmbH
* @author j.schirrmacher@justso.de
*/
namespace justso\justauth;
use justso\justapi\RequestHelper;
/**
* Interface UserInterface
*/
interface UserInterface
{
/**
* Sets user data from request.
*
* @param RequestHelper $request
* @deprecated Use setFromArray() instead
*/
public function setFromRequest(RequestHelper $request);
/**
* Sets user data from an array.
*
* @param array $data
*/
public function setFromArray(array $data);
/**
* Returns the id of the user.
*
* @return int
*/
public function getId();
/**
* Returns the full name of the user or an empty string if the name is not (yet) known.
*
* @return string
*/
public function getFullName();
/**
* Returns the e-mail address of the user.
*
* @return string
*/
public function getEMail();
/**
* @return boolean
*/
public function isActive();
/**
* @param boolean $active
*/
public function setActive($active);
/**
* Checks if the password is correct
*
* @param $password
* @return bool
*/
public function checkPassword($password);
/**
* Returns the access token set for this user or null if there is none.
*
* @return string
*/
public function getToken();
/**
* Sets an access token for this user.
*
* @param string $code
*/
public function setToken($code);
/**
* Sets the destination for access via the access token.
*
* @param string $destination
*/
public function setDestination($destination);
/**
* Returns the destination of an access via the current access token.
*
* @return string
*/
public function getDestination();
}