public PowerShellResults <PimSubscriptionRow> ResendPopVerificationEmail(Identity[] identities, BaseWebServiceParameters parameters)
        {
            identities.FaultIfNotExactlyOne();
            SetPopSubscription setPopSubscription = new SetPopSubscription();

            setPopSubscription.ResendVerification = true;
            PowerShellResults <PimSubscriptionRow> powerShellResults = base.SetObject <PopSubscription, SetPopSubscription, PimSubscriptionRow>("Set-PopSubscription", identities[0], setPopSubscription);

            if (powerShellResults.Succeeded)
            {
                PopSubscriptions popSubscriptions           = new PopSubscriptions();
                PowerShellResults <PopSubscription> @object = popSubscriptions.GetObject(identities[0]);
                if ([email protected])
                {
                    throw new FaultException(OwaOptionStrings.SubscriptionProcessingError);
                }
                string verificationFeedbackString = @object.Output[0].VerificationFeedbackString;
                if (verificationFeedbackString != null)
                {
                    powerShellResults.Informations = new string[]
                    {
                        verificationFeedbackString
                    };
                }
            }
            return(powerShellResults);
        }
Esempio n. 2
0
        protected override void OnLoad(EventArgs e)
        {
            string subscriptionTypeParam = this.Context.Request.QueryString["st"];
            string subscriptionGuidParam = this.Context.Request.QueryString["su"];
            string text = this.Context.Request.QueryString["ss"];
            AggregationSubscriptionType aggregationSubscriptionType;
            Guid   subscriptionId;
            string queryParam;

            if (!this.ValidateUrlParameters(subscriptionTypeParam, subscriptionGuidParam, text, out aggregationSubscriptionType, out subscriptionId, out queryParam))
            {
                throw new BadQueryParameterException(queryParam);
            }
            ADObjectId executingUserId = RbacPrincipal.Current.ExecutingUserId;
            AggregationSubscriptionIdentity    subId = new AggregationSubscriptionIdentity(executingUserId, subscriptionId);
            AggregationSubscriptionIdParameter aggregationSubscriptionIdParameter = new AggregationSubscriptionIdParameter(subId);
            string text2 = aggregationSubscriptionIdParameter.ToString();

            if (text2 == null)
            {
                ErrorHandlingUtil.TransferToErrorPage("unexpected");
                return;
            }
            if (aggregationSubscriptionType == AggregationSubscriptionType.Pop)
            {
                PopSubscriptions   popSubscriptions   = new PopSubscriptions();
                SetPopSubscription setPopSubscription = new SetPopSubscription();
                setPopSubscription.ValidateSecret = text;
                setPopSubscription.AllowExceuteThruHttpGetRequest = true;
                Identity identity = new Identity(text2, text2);
                PowerShellResults <PopSubscription> results = popSubscriptions.SetObject(identity, setPopSubscription);
                this.DisplayResults <PopSubscription>(results);
                return;
            }
            ImapSubscriptions   imapSubscriptions   = new ImapSubscriptions();
            SetImapSubscription setImapSubscription = new SetImapSubscription();

            setImapSubscription.ValidateSecret = text;
            setImapSubscription.AllowExceuteThruHttpGetRequest = true;
            Identity identity2 = new Identity(text2, text2);
            PowerShellResults <ImapSubscription> results2 = imapSubscriptions.SetObject(identity2, setImapSubscription);

            this.DisplayResults <ImapSubscription>(results2);
        }
Esempio n. 3
0
        public PowerShellResults <PopSubscription> SetObject(Identity identity, SetPopSubscription properties)
        {
            PowerShellResults <PopSubscription> powerShellResults = base.SetObject <PopSubscription, SetPopSubscription>("Set-PopSubscription", identity, properties);

            if (powerShellResults.Succeeded)
            {
                PowerShellResults <PopSubscription> @object = this.GetObject(identity);
                if (@object.Succeeded)
                {
                    string verificationFeedbackString = @object.Output[0].VerificationFeedbackString;
                    if (verificationFeedbackString != null)
                    {
                        string text = OwaOptionStrings.SetSubscriptionSucceed(verificationFeedbackString);
                        powerShellResults.Informations = new string[]
                        {
                            text
                        };
                    }
                }
                Util.NotifyOWAUserSettingsChanged(UserSettings.Mail);
            }
            return(powerShellResults);
        }