OrganizationUserSave() public static method

public static OrganizationUserSave ( OrganizationUser organizationUser ) : OrganizationUser
organizationUser OrganizationUser
return OrganizationUser
        public static OrganizationUser OrganizationUserAdd(int organizationId, int userId, Role role)
        {
            var organizationUser = OrganizationUser.NewOrganizationUser(organizationId, userId);

            organizationUser.RoleId = (int)role;

            organizationUser = OrganizationUserRepository.OrganizationUserSave(organizationUser);

            return(organizationUser);
        }
        internal static OrganizationUser OrganizationUserAdd(int organizationId, int userId, Role role, bool ignoreAuthorization)
        {
            var organizationUser = OrganizationUser.NewOrganizationUser(organizationId, userId);

            organizationUser.RoleId = (int)role;

            if (ignoreAuthorization)
            {
                organizationUser = OrganizationUserRepository.OrganizationUserInsert(organizationUser);
            }
            else
            {
                organizationUser = OrganizationUserRepository.OrganizationUserSave(organizationUser);
            }

            return(organizationUser);
        }