/// <summary> /// Confirms that an account for the specified user name is valid and activates the account. /// </summary> /// <param name="userName">The user name.</param> /// <param name="accountConfirmationToken">A confirmation token to pass to the authentication provider.</param> /// <returns><c>true</c> if the account is confirmed; otherwise, <c>false</c>.</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 bool ConfirmAccount(string userName, string accountConfirmationToken) { MySqlSimpleMembershipProvider provider = VerifyProvider(); Debug.Assert(provider != null); // VerifyProvider checks this return(provider.ConfirmAccount(userName, accountConfirmationToken)); }