Index: evolution-data-server/libedataserverui/e-book-auth-util.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/libedataserverui/e-book-auth-util.c,v
retrieving revision 1.7
diff -u -p -r1.7 e-book-auth-util.c
--- evolution-data-server/libedataserverui/e-book-auth-util.c	6 Jan 2006 09:33:23 -0000	1.7
+++ evolution-data-server/libedataserverui/e-book-auth-util.c	20 Jan 2006 10:05:32 -0000
@@ -165,12 +165,17 @@ addressbook_authenticate (EBook *book, g
 
 	auth = e_source_get_property (source, "auth");
 
-	if (auth && !strcmp ("ldap/simple-binddn", auth))
+	if (auth && !strcmp ("ldap/simple-binddn", auth)) {
 		user = e_source_get_property (source, "binddn");
-	else if (auth && !strcmp ("plain/password", auth))
+	}
+	else if (auth && !strcmp ("plain/password", auth)) {
 		user = e_source_get_property (source, "user");
-	else
+		if (!user)
+			user = e_source_get_property (source, "username");
+	}
+	else {
 		user = e_source_get_property (source, "email_addr");
+	}
 	if (!user)
 		user = "";
 
Index: evolution/addressbook/gui/component/addressbook.c
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/gui/component/addressbook.c,v
retrieving revision 1.254
diff -u -p -r1.254 addressbook.c
--- evolution/addressbook/gui/component/addressbook.c	30 Sep 2005 11:20:50 -0000	1.254
+++ evolution/addressbook/gui/component/addressbook.c	20 Jan 2006 10:05:52 -0000
@@ -171,12 +171,17 @@ addressbook_authenticate (EBook *book, g
 
 	auth = e_source_get_property (source, "auth");
 
-	if (auth && !strcmp ("ldap/simple-binddn", auth))
+	if (auth && !strcmp ("ldap/simple-binddn", auth)) {
 		user = e_source_get_property (source, "binddn");
-	else if (auth && !strcmp ("plain/password", auth))
+	}
+	else if (auth && !strcmp ("plain/password", auth)) {
 		user = e_source_get_property (source, "user");
-	else
+		if (!user)
+			user = e_source_get_property (source, "username");
+	}
+	else {
 		user = e_source_get_property (source, "email_addr");
+	}
 	if (!user)
 		user = "";
 
