コード例 #1
0
        /// <summary>
        /// Gets the password changed date.
        /// </summary>
        /// <param name="userName">Name of the user.</param>
        /// <returns>The date and time when the password was most recently changed, or <see cref="System.DateTime.MinValue"/> if the password has not been changed for this account.</returns>
        /// <exception cref="System.InvalidOperationException">
        /// The <seealso cref="Initialized"/> method was not called.-or-
        /// The <seealso cref="InitializeDatabaseConnection(string)"/> method was not called.-or-
        /// The <seealso cref="MySqlSimpleMembershipProvider"/> membership provider is not registered in the configuration of your site.
        /// For more information, contact your site's system administrator.
        /// </exception>
        public static DateTime GetPasswordChangedDate(string userName)
        {
            MySqlSimpleMembershipProvider provider = VerifyProvider();

            Debug.Assert(provider != null);             // VerifyProvider checks this

            return(provider.GetPasswordChangedDate(userName));
        }