fixing illegal offset type in User.php