Modified check_user() in profile model