add functions in User.php