Code Duplication    Length = 8-8 lines in 2 locations

Auth/class.User.php 2 locations

@@ 290-297 (lines=8) @@
287
288
    private function checkForUnsettableElements($data)
289
    {
290
        if(isset($data->mail))
291
        {
292
            if($data->mail !== $this->mail)
293
            {
294
                throw new \Exception('Unable to change email!');
295
            }
296
            unset($data->mail);
297
        }
298
        if(isset($data->uid))
299
        {
300
            if($data->uid !== $this->uid)
@@ 298-305 (lines=8) @@
295
            }
296
            unset($data->mail);
297
        }
298
        if(isset($data->uid))
299
        {
300
            if($data->uid !== $this->uid)
301
            {
302
                throw new \Exception('Unable to change uid!');
303
            }
304
            unset($data->uid);
305
        }
306
    }
307
308
    private function editAddressElements($data)