public PowerShellResults <PimSubscriptionRow> ResendImapVerificationEmail(Identity[] identities, BaseWebServiceParameters parameters)
        {
            identities.FaultIfNotExactlyOne();
            SetImapSubscription setImapSubscription = new SetImapSubscription();

            setImapSubscription.ResendVerification = true;
            PowerShellResults <PimSubscriptionRow> powerShellResults = base.SetObject <ImapSubscription, SetImapSubscription, PimSubscriptionRow>("Set-ImapSubscription", identities[0], setImapSubscription);

            if (powerShellResults.Succeeded)
            {
                ImapSubscriptions imapSubscriptions          = new ImapSubscriptions();
                PowerShellResults <ImapSubscription> @object = imapSubscriptions.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);
        }
Example #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);
        }