1
|
|
|
<?php namespace FreedomCore\TrinityCore\Console\Commands; |
2
|
|
|
|
3
|
|
|
use FreedomCore\TrinityCore\Console\Abstracts\BaseCommand; |
4
|
|
|
|
5
|
|
|
/** |
6
|
|
|
* Class Account |
7
|
|
|
* @package FreedomCore\TrinityCore\Console\Commands |
8
|
|
|
* @codeCoverageIgnore |
9
|
|
|
*/ |
10
|
|
|
class Account extends BaseCommand |
11
|
|
|
{ |
12
|
|
|
|
13
|
|
|
/** |
14
|
|
|
* Create new account |
15
|
|
|
* @param string $account |
16
|
|
|
* @param string $password |
17
|
|
|
* @return mixed |
18
|
|
|
*/ |
19
|
|
|
public function create(string $account, string $password) |
20
|
|
|
{ |
21
|
|
|
return $this->executeCommand(__FUNCTION__, get_defined_vars()); |
22
|
|
|
} |
23
|
|
|
|
24
|
|
|
/** |
25
|
|
|
* Delete specified account |
26
|
|
|
* @param string $account |
27
|
|
|
* @return mixed |
28
|
|
|
*/ |
29
|
|
|
public function delete(string $account) |
30
|
|
|
{ |
31
|
|
|
return $this->executeCommand(__FUNCTION__, get_defined_vars()); |
32
|
|
|
} |
33
|
|
|
|
34
|
|
|
/** |
35
|
|
|
* Set new password for the account |
36
|
|
|
* @param string $oldPassword |
37
|
|
|
* @param string $newPassword |
38
|
|
|
* @param string $repeatPassword |
39
|
|
|
* @return mixed |
40
|
|
|
*/ |
41
|
|
|
public function password(string $oldPassword, string $newPassword, string $repeatPassword) |
42
|
|
|
{ |
43
|
|
|
return $this->executeCommand(__FUNCTION__, get_defined_vars()); |
44
|
|
|
} |
45
|
|
|
|
46
|
|
|
/** |
47
|
|
|
* Set expansion version for specified account |
48
|
|
|
* @param string $account |
49
|
|
|
* @param int $addon |
50
|
|
|
* @return mixed |
51
|
|
|
*/ |
52
|
|
|
public function setAddon(string $account, int $addon) |
53
|
|
|
{ |
54
|
|
|
return $this->executeCommand(__FUNCTION__, get_defined_vars()); |
55
|
|
|
} |
56
|
|
|
|
57
|
|
|
/** |
58
|
|
|
* Set Game Mater Level For Account |
59
|
|
|
* @param string $account |
60
|
|
|
* @param int $level |
61
|
|
|
* @param int $realm |
62
|
|
|
* @return mixed |
63
|
|
|
*/ |
64
|
|
|
public function setGmLevel(string $account, int $level, int $realm = -1) |
65
|
|
|
{ |
66
|
|
|
return $this->executeCommand(__FUNCTION__, get_defined_vars()); |
67
|
|
|
} |
68
|
|
|
|
69
|
|
|
/** |
70
|
|
|
* Sets the regmail for specified account |
71
|
|
|
* @param string $account |
72
|
|
|
* @param string $regMail |
73
|
|
|
* @param string $repeatRegMail |
74
|
|
|
* @return array|string |
75
|
|
|
*/ |
76
|
|
|
public function setSecRegmail(string $account, string $regMail, string $repeatRegMail) |
77
|
|
|
{ |
78
|
|
|
return $this->executeCommand(__FUNCTION__, get_defined_vars()); |
79
|
|
|
} |
80
|
|
|
|
81
|
|
|
/** |
82
|
|
|
* Set the email for specified account |
83
|
|
|
* @param string $account |
84
|
|
|
* @param string $email |
85
|
|
|
* @param string $repeatEmail |
86
|
|
|
* @return array|string |
87
|
|
|
*/ |
88
|
|
|
public function setSecEmail(string $account, string $email, string $repeatEmail) |
89
|
|
|
{ |
90
|
|
|
return $this->executeCommand(__FUNCTION__, get_defined_vars()); |
91
|
|
|
} |
92
|
|
|
|
93
|
|
|
/** |
94
|
|
|
* Set password for account. |
95
|
|
|
* @param string $oldPassword |
96
|
|
|
* @param string $newPassword |
97
|
|
|
* @param string $repeatPassword |
98
|
|
|
* @return mixed |
99
|
|
|
*/ |
100
|
|
|
public function setPassword(string $oldPassword, string $newPassword, string $repeatPassword) |
101
|
|
|
{ |
102
|
|
|
return $this->password($oldPassword, $newPassword, $repeatPassword); |
103
|
|
|
} |
104
|
|
|
} |
105
|
|
|
|