|
@@ 81-83 (lines=3) @@
|
| 78 |
|
public static function save($user) |
| 79 |
|
{ |
| 80 |
|
$admins = array(); |
| 81 |
|
if (file_exists(CONFIG_DIR . DIRECTORY_SEPARATOR . 'admins.json')) { |
| 82 |
|
$admins = json_decode(file_get_contents(CONFIG_DIR . DIRECTORY_SEPARATOR . 'admins.json'), TRUE); |
| 83 |
|
} |
| 84 |
|
$admins[$user['username']]['hash'] = sha1($user['username'] . $user['password']); |
| 85 |
|
$admins[$user['username']]['profile'] = $user['profile']; |
| 86 |
|
|
|
@@ 107-109 (lines=3) @@
|
| 104 |
|
public function getAdmins() |
| 105 |
|
{ |
| 106 |
|
$admins = array(); |
| 107 |
|
if (file_exists(CONFIG_DIR . DIRECTORY_SEPARATOR . 'admins.json')) { |
| 108 |
|
$admins = json_decode(file_get_contents(CONFIG_DIR . DIRECTORY_SEPARATOR . 'admins.json'), TRUE); |
| 109 |
|
} |
| 110 |
|
|
| 111 |
|
return $admins; |
| 112 |
|
} |