private bool IsValidForUserCreation(OpenIdEventArgs e, ClaimsResponse claim)
        {
            bool result = true;

            if (claim == null)
            {
                return(false);
            }

            if (String.IsNullOrEmpty(claim.Email))
            {
                return(false);
            }
            if (String.IsNullOrEmpty(claim.FullName))
            {
                return(false);
            }

            if (!Email.IsValidEmailAddressSyntax(claim.Email))
            {
                return(false);
            }

            mojoProfileConfiguration profileConfig = mojoProfileConfiguration.GetConfig();

            if (profileConfig.HasRequiredCustomProperties())
            {
                result = false;
            }

            return(result);
        }
        private bool IsValidForUserCreation(OpenIdEventArgs e, ClaimsResponse claim)
        {
            if (e == null)
            {
                return(false);
            }
            if (claim == null)
            {
                return(false);
            }
            if (e.ClaimedIdentifier == null)
            {
                return(false);
            }

            if (String.IsNullOrEmpty(claim.Email))
            {
                return(false);
            }
            if (String.IsNullOrEmpty(claim.FullName))
            {
                return(false);
            }

            if (!Email.IsValidEmailAddressSyntax(claim.Email))
            {
                return(false);
            }

            // if custom profile fields are required
            // must pass them on to registration page
            mojoProfileConfiguration profileConfig = mojoProfileConfiguration.GetConfig();

            if (profileConfig != null)
            {
                if (profileConfig.HasRequiredCustomProperties())
                {
                    return(false);
                }
            }

            return(true);
        }
Esempio n. 3
0
        private bool IsValidForUserCreation(OpenIdRpxAuthInfo authInfo)
        {
            bool result = true;

            if (authInfo == null)
            {
                return(false);
            }

            if (String.IsNullOrEmpty(authInfo.Email))
            {
                return(false);
            }
            if (termsOfUse.Length > 0)
            {
                return(false);
            }
            if ((displaySettings.ShowNewsLetters) && (siteAvailableSubscriptions.Count > 0))
            {
                return(false);
            }


            if (!Email.IsValidEmailAddressSyntax(authInfo.Email))
            {
                return(false);
            }

            mojoProfileConfiguration profileConfig = mojoProfileConfiguration.GetConfig();

            if (profileConfig.HasRequiredCustomProperties())
            {
                result = false;
            }

            return(result);
        }