Code Duplication    Length = 3-3 lines in 2 locations

src/base/Security.php 2 locations

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