Code Duplication    Length = 3-3 lines in 2 locations

src/base/Security.php 2 locations

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