def get_dict_from_user(user):
    """
    Function for getting dict from user model.

    :param user: user
        Object of user model for serialization

    :return: dict
        Dict with user fields for checking.
    """
    return {'first_name': user.first_name, 'last_name': user.last_name,
            'email': user.email, 'username': user.username, 'id': user.id,
            'organization': user.organization}