MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:rburnett Date:January 2 2008 9:09pm
Subject:Connector/NET commit: r1135 - in branches/5.1: . MySql.Web/Providers/Source MySql.Web/Tests
View as plain text  
Modified:
   branches/5.1/CHANGES
   branches/5.1/MySql.Web/Providers/Source/MembershipProvider.cs
   branches/5.1/MySql.Web/Tests/UserManagement.cs
Log:
  - Fixed problem with membership provider where FindUserByEmail would fail trying to add
    a second parameter with the same name as the first (bug #33347)

Modified: branches/5.1/CHANGES
===================================================================
--- branches/5.1/CHANGES	2007-12-18 20:17:38 UTC (rev 1134)
+++ branches/5.1/CHANGES	2008-01-02 21:09:25 UTC (rev 1135)
@@ -1,3 +1,7 @@
+Version 5.1.5 - 
+  - Fixed problem with membership provider where FindUserByEmail would fail trying to add
+    a second parameter with the same name as the first (bug #33347)
+    
 Version 5.1.4 - 11/12/2007
   - Fixed issue where column name metadata was not using the charset given on the connection string
     (Bug #31185)

Modified: branches/5.1/MySql.Web/Providers/Source/MembershipProvider.cs
===================================================================
--- branches/5.1/MySql.Web/Providers/Source/MembershipProvider.cs	2007-12-18 20:17:38 UTC (rev 1134)
+++ branches/5.1/MySql.Web/Providers/Source/MembershipProvider.cs	2008-01-02 21:09:25 UTC (rev 1135)
@@ -1332,6 +1332,7 @@
                     FROM mysql_Membership WHERE Email LIKE ?EmailSearch AND 
                     ApplicationName = ?ApplicationName " +
                     " ORDER BY Username Asc";
+                cmd.Parameters.Clear();
                 cmd.Parameters.Add("?EmailSearch", MySqlDbType.VarChar, 255).Value = emailToMatch;
                 cmd.Parameters.Add("?ApplicationName", MySqlDbType.VarChar, 255).Value = pApplicationName;
                 reader = cmd.ExecuteReader();

Modified: branches/5.1/MySql.Web/Tests/UserManagement.cs
===================================================================
--- branches/5.1/MySql.Web/Tests/UserManagement.cs	2007-12-18 20:17:38 UTC (rev 1134)
+++ branches/5.1/MySql.Web/Tests/UserManagement.cs	2008-01-02 21:09:25 UTC (rev 1135)
@@ -130,6 +130,17 @@
         }
 
         [Test]
+        public void FindUsersByEmail()
+        {
+            CreateUserWithHashedPassword();
+
+            int records;
+            MembershipUserCollection users = provider.FindUsersByEmail("foo@stripped", 0, 10, out records);
+            Assert.AreEqual(1, records);
+            Assert.AreEqual("foo", users["foo"].UserName);
+        }
+
+        [Test]
         public void TestCreateUserOverrides()
         {
             try

Thread
Connector/NET commit: r1135 - in branches/5.1: . MySql.Web/Providers/Source MySql.Web/Testsrburnett2 Jan