Code Duplication    Length = 3-3 lines in 2 locations

src/base/Security.php 2 locations

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