diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php
index 66de3be2cc54b41c5e22eeee6baa4407e704d36f..be81c9b967df90cce7408e2972a01ea592f58f5e 100644
--- a/htdocs/adherents/card.php
+++ b/htdocs/adherents/card.php
@@ -253,7 +253,8 @@ if (empty($reshook))
 		}
 		$lastname=$_POST["lastname"];
 		$firstname=$_POST["firstname"];
-		$morphy=$morphy=$_POST["morphy"];
+		$morphy=$_POST["morphy"];
+		$login=$_POST["login"];
 		if ($morphy != 'mor' && empty($lastname)) {
 			$error++;
 			$langs->load("errors");
@@ -264,7 +265,14 @@ if (empty($reshook))
 			$langs->load("errors");
 			setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Firstname")), null, 'errors');
 		}
-
+		// Test si le login existe deja
+		if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
+		{
+			if (empty($login)) {
+				$error++;
+				setEventMessages($langs->trans("ErrorFieldRequired", $langs->trans("Login")), null, 'errors');
+			}
+		}
 		// Create new object
 		if ($result > 0 && ! $error)
 		{