Code Duplication    Length = 10-10 lines in 2 locations

Auth/User.php 2 locations

@@ 269-278 (lines=10) @@
266
    {
267
        if(isset($data->password))
268
        {
269
            if(isset($data->oldpass))
270
            {
271
                $this->change_pass($data->oldpass, $data->password);
272
                unset($data->oldpass);
273
            }
274
            else if(isset($data->hash))
275
            {
276
                $this->change_pass($data->hash, $data->password, true);
277
                unset($data->hash);
278
            }
279
            unset($data->password);
280
        }
281
        else if(isset($data->userPassword))
@@ 283-292 (lines=10) @@
280
        }
281
        else if(isset($data->userPassword))
282
        {
283
            if(isset($data->oldpass))
284
            {
285
                $this->change_pass($data->oldpass, $data->userPassword);
286
                unset($data->oldpass);
287
            }
288
            else if(isset($data->hash))
289
            {
290
                $this->change_pass($data->hash, $data->userPassword, true);
291
                unset($data->hash);
292
            }
293
            unset($data->userPassword);
294
        }
295
    }