--- a/branches/1.9/modules/auth/auth_mod.c
+++ b/branches/1.9/modules/auth/auth_mod.c
@@ -1,5 +1,5 @@
 /* 
- * $Id: auth_mod.c 8499 2011-10-18 10:28:47Z bogdan_iancu $ 
+ * $Id: auth_mod.c 10393 2014-03-12 17:07:29Z opensipsrelease $ 
  *
  * Digest Authentication Module
  *
@@ -366,11 +366,11 @@
 			pv_value_destroy(&sval);
 			return 1;
 		}
-		if(sval.rs.len!= _username->user.len
-				|| strncasecmp(sval.rs.s, _username->user.s, sval.rs.len))
+		if(sval.rs.len!= _username->whole.len
+				|| strncasecmp(sval.rs.s, _username->whole.s, sval.rs.len))
 		{
 			LM_DBG("username mismatch [%.*s] [%.*s]\n",
-				_username->user.len, _username->user.s, sval.rs.len, sval.rs.s);
+				_username->whole.len, _username->whole.s, sval.rs.len, sval.rs.s);
 			pv_value_destroy(&sval);
 			return 1;
 		}