Code Duplication    Length = 3-3 lines in 2 locations

src/base/Security.php 2 locations

@@ 108-110 (lines=3) @@
105
    public static function save($user)
106
    {
107
        $admins = array();
108
        if (file_exists(CONFIG_DIR . DIRECTORY_SEPARATOR . 'admins.json')) {
109
            $admins = json_decode(file_get_contents(CONFIG_DIR . DIRECTORY_SEPARATOR . 'admins.json'), TRUE);
110
        }
111
        $admins[$user['username']]['hash'] = sha1($user['username'] . $user['password']);
112
        $admins[$user['username']]['profile'] = $user['profile'];
113
@@ 148-150 (lines=3) @@
145
    public function getAdmins()
146
    {
147
        $admins = array();
148
        if (file_exists(CONFIG_DIR . DIRECTORY_SEPARATOR . 'admins.json')) {
149
            $admins = json_decode(file_get_contents(CONFIG_DIR . DIRECTORY_SEPARATOR . 'admins.json'), TRUE);
150
        }
151
152
        return $admins;
153
    }