Создание веб-приложения, сочетающего в себе проектирование и создание баз данных, работу со сторонними форматами данных, программирование в NET и веб-разработку, страница 59

        {

            get { return enablePasswordReset; }

        }

        public override bool EnablePasswordRetrieval

        {

            get { return enablePasswordRetrieval; }

        }

        public override MembershipUserCollection FindUsersByEmail(string emailToMatch, int pageIndex, int pageSize, out int totalRecords)

        {

            throw new NotImplementedException();

        }

        public override MembershipUserCollection FindUsersByName(string usernameToMatch, int pageIndex, int pageSize, out int totalRecords)

        {

            throw new NotImplementedException();

        }

        public override MembershipUserCollection GetAllUsers(int pageIndex, int pageSize, out int totalRecords)

        {

            throw new NotImplementedException();

        }

        public override int GetNumberOfUsersOnline()

        {

            throw new NotImplementedException();

        }

        public override string GetPassword(string username, string answer)

        {

            throw new NotImplementedException();

        }

        public override MembershipUser GetUser(string username, bool userIsOnline)

        {

            MySqlConnection conn = null;

            try

            {

                //ОБЪЯВЛЕНИЕ

                conn = new MySqlConnection(connectionString);

                conn.Open();

                string sql;

                MySqlCommand comm = null;

                MySqlDataAdapter adapter = null;

                DataSet data = new DataSet();

                //СОБИРАЕМ ПОЛЬЗОВАТЕЛЯ

                sql = "SELECT * FROM auth_user WHERE name = '" + username + "';";

                comm = new MySqlCommand(sql, conn);

                adapter = new MySqlDataAdapter(sql, conn);

                adapter.Fill(data);

                if (data.Tables[0].Rows.Count == 1)

                {

                    MembershipUser user = new MembershipUser(providerName, data.Tables[0].Rows[0]["name"].ToString(), data.Tables[0].Rows[0]["id"].ToString(), data.Tables[0].Rows[0]["email"].ToString(), null, null, true, false, DateTime.Now, DateTime.Now, DateTime.Now, DateTime.Now, DateTime.Now);

                    return user;

                }

                //ЕСЛИ НЕТ - ВОЗВРАЩАЕМ NULL

                else

                {

                    return null;

                }

            }

            catch (MySqlException exp)

            {

                conn.Close();

                return null;

            }

        }

        public override MembershipUser GetUser(object providerUserKey, bool userIsOnline)

        {

            throw new NotImplementedException();

        }

        public override string GetUserNameByEmail(string email)

        {

            throw new NotImplementedException();

        }

        public override int MaxInvalidPasswordAttempts

        {

            get { return maxInvalidPasswordAttempts; }

        }

        public override int MinRequiredNonAlphanumericCharacters

        {

            get { return minRequiredNonAlphanumericCharacters; }

        }

        public override int MinRequiredPasswordLength

        {

            get { return minRequiredPasswordLength; }

        }

        public override int PasswordAttemptWindow

        {

            get { return passwordAttemptWindow; }

        }

        public override MembershipPasswordFormat PasswordFormat

        {

            get { return passwordFormat; }

        }

        public override string PasswordStrengthRegularExpression

        {

            get { return passwordStrengthRegularExpression; }

        }

        public override bool RequiresQuestionAndAnswer

        {

            get { return requiresQuestionAndAnswer; }

        }

        public override bool RequiresUniqueEmail

        {

            get { return requiresUniqueEmail; }