def format_user_for_slack(user):
    """Return slack formatted username.

    If user doesn't have last_name set, return unformated email.
    """
    if getattr(user, "last_name", None):
        return f"<@{user.last_name}>"
    return user.email