コード例 #1
0
        private BaseResponse EmailInUse(DynamicDictionary _parameters)
        {
            HydrantWikiManager  hwm      = new HydrantWikiManager();
            IsAvailableResponse response = new IsAvailableResponse {
                Available = false, Success = true
            };

            string email = _parameters["email"];

            if (email != null)
            {
                User user = hwm.GetUserByEmail(UserSources.HydrantWiki, email);

                TraceFileHelper.Info("Check if email in use ({0})", email);

                if (user == null)
                {
                    response.Available = true;
                }
            }

            return(response);
        }
コード例 #2
0
        private BaseResponse IsAvailable(DynamicDictionary _parameters)
        {
            HydrantWikiManager  hwm      = new HydrantWikiManager();
            IsAvailableResponse response = new IsAvailableResponse {
                Available = false, Success = true
            };

            string username = _parameters["username"];

            if (username != null)
            {
                User user = hwm.GetUser(UserSources.HydrantWiki, username);

                TraceFileHelper.Info("Check if username exists ({0})", username);

                if (user == null)
                {
                    response.Available = true;
                }
            }

            return(response);
        }