|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/** |
|
4
|
|
|
* @license LGPLv3, http://opensource.org/licenses/LGPL-3.0 |
|
5
|
|
|
* @copyright Aimeos (aimeos.org), 2015-2025 |
|
6
|
|
|
* @package MShop |
|
7
|
|
|
* @subpackage Customer |
|
8
|
|
|
*/ |
|
9
|
|
|
|
|
10
|
|
|
|
|
11
|
|
|
namespace Aimeos\MShop\Customer\Item; |
|
12
|
|
|
|
|
13
|
|
|
|
|
14
|
|
|
/** |
|
15
|
|
|
* Customer DTO object for the FosUserBundle. |
|
16
|
|
|
* |
|
17
|
|
|
* @package MShop |
|
18
|
|
|
* @subpackage Customer |
|
19
|
|
|
*/ |
|
20
|
|
|
class FosUser extends Standard implements Iface |
|
21
|
|
|
{ |
|
22
|
|
|
/** |
|
23
|
|
|
* Returns the associated user roles |
|
24
|
|
|
* |
|
25
|
|
|
* @return array List of Symfony roles |
|
26
|
|
|
*/ |
|
27
|
|
|
public function getRoles() : array |
|
28
|
|
|
{ |
|
29
|
|
|
return $this->get( 'roles', [] ); |
|
30
|
|
|
} |
|
31
|
|
|
|
|
32
|
|
|
|
|
33
|
|
|
/** |
|
34
|
|
|
* Sets the associated user roles |
|
35
|
|
|
* |
|
36
|
|
|
* @param array $roles List of Symfony roles |
|
37
|
|
|
* @return \Aimeos\MShop\Customer\Item\Iface Customer item for chaining method calls |
|
38
|
|
|
*/ |
|
39
|
|
|
public function setRoles( array $roles ) : \Aimeos\MShop\Customer\Item\Iface |
|
40
|
|
|
{ |
|
41
|
|
|
return $this->set( 'roles', $roles ); |
|
42
|
|
|
} |
|
43
|
|
|
|
|
44
|
|
|
|
|
45
|
|
|
/** |
|
46
|
|
|
* Returns the password salt |
|
47
|
|
|
* |
|
48
|
|
|
* @return string Password salt |
|
49
|
|
|
* @deprecated 2025.01 Not used for password hashing anymore |
|
50
|
|
|
*/ |
|
51
|
|
|
public function getSalt() : string |
|
52
|
|
|
{ |
|
53
|
|
|
return $this->get( 'salt', '' ); |
|
54
|
|
|
} |
|
55
|
|
|
|
|
56
|
|
|
|
|
57
|
|
|
/** |
|
58
|
|
|
* Sets the password salt |
|
59
|
|
|
* |
|
60
|
|
|
* @param string $value Password salt |
|
61
|
|
|
* @return \Aimeos\MShop\Customer\Item\Iface Customer item for chaining method calls |
|
62
|
|
|
* @deprecated 2025.01 Not used for password hashing anymore |
|
63
|
|
|
*/ |
|
64
|
|
|
public function setSalt( string $value ) : \Aimeos\MShop\Customer\Item\Iface |
|
65
|
|
|
{ |
|
66
|
|
|
return $this->set( 'salt', $value ); |
|
67
|
|
|
} |
|
68
|
|
|
} |
|
69
|
|
|
|