|
@@ 100-102 (lines=3) @@
|
| 97 |
|
public static function save($user) |
| 98 |
|
{ |
| 99 |
|
$admins = array(); |
| 100 |
|
if (file_exists(CONFIG_DIR . DIRECTORY_SEPARATOR . 'admins.json')) { |
| 101 |
|
$admins = json_decode(file_get_contents(CONFIG_DIR . DIRECTORY_SEPARATOR . 'admins.json'), TRUE); |
| 102 |
|
} |
| 103 |
|
$admins[$user['username']]['hash'] = sha1($user['username'] . $user['password']); |
| 104 |
|
$admins[$user['username']]['profile'] = $user['profile']; |
| 105 |
|
|
|
@@ 139-141 (lines=3) @@
|
| 136 |
|
public function getAdmins() |
| 137 |
|
{ |
| 138 |
|
$admins = array(); |
| 139 |
|
if (file_exists(CONFIG_DIR . DIRECTORY_SEPARATOR . 'admins.json')) { |
| 140 |
|
$admins = json_decode(file_get_contents(CONFIG_DIR . DIRECTORY_SEPARATOR . 'admins.json'), TRUE); |
| 141 |
|
} |
| 142 |
|
|
| 143 |
|
return $admins; |
| 144 |
|
} |