diff --git a/modules/ldapstatus/lib/Auth/Backend/Test/StandardLDAPTest.php b/modules/ldapstatus/lib/Auth/Backend/Test/StandardLDAPTest.php
index 7e420604acdff98de7ed97acf61b54cb33bd1a03..56b524365352599cbeaee808eb48f2f5231c117d 100755
--- a/modules/ldapstatus/lib/Auth/Backend/Test/StandardLDAPTest.php
+++ b/modules/ldapstatus/lib/Auth/Backend/Test/StandardLDAPTest.php
@@ -122,7 +122,7 @@ class sspmod_ldapstatus_Auth_Backend_Test_StandardLDAPTest extends sspmod_feide_
 			try {
 				$tester->tick('adminBind');
 		
-				$this->adminBind($this->location->getString('adminUser'), $this->location->getString('adminPassword'));
+				$this->adminBind();
 				$result['adminBind'] = array(TRUE,$tester->tack('connect'));
 				$result['adminBind']['time'] = $tester->tack('connect', FALSE); 
 				
@@ -178,7 +178,8 @@ class sspmod_ldapstatus_Auth_Backend_Test_StandardLDAPTest extends sspmod_feide_
 			try {
 				$tester->tick('ldapSearchTestUser');
 				
-				$userDN = $this->searchForUser($this->location->getValue('testUser')); 
+				$testUser = $this->location->getString('testUser');
+				$userDN = $this->searchForUser($testUser);
 				$result['ldapSearchTestUser'] = array(TRUE,$tester->tack('ldapSearchTestUser'));
 				$result['ldapSearchTestUser']['time'] = $tester->tack('ldapSearchTestUser', FALSE); 
 				
@@ -210,9 +211,9 @@ class sspmod_ldapstatus_Auth_Backend_Test_StandardLDAPTest extends sspmod_feide_
 			
 			$tester->tick('ldapBindTestUser');
 			try {
-				if ($attributes = $this->userBind(
-						$userDN, 
-						$this->location->getValue('testPassword') )) {
+				$this->userBind($testUser, $userDN, $this->location->getValue('testPassword'));
+				$attributes = $this->getAttributes($userDN);
+				if ($attributes) {
 					$result['ldapBindTestUser'] = array(TRUE,$tester->tack('ldapBindTestUser'));
 					$result['ldapBindTestUser']['time'] = $tester->tack('ldapBindTestUser', FALSE); 
 				} else {
@@ -233,9 +234,8 @@ class sspmod_ldapstatus_Auth_Backend_Test_StandardLDAPTest extends sspmod_feide_
 				$tester->tick('getTestOrg');
 
 				// Get organization and organizationUnit data.
-				$this->getOrg($attributes, $this->location->getValue('testUser'));
-				$this->getOrgUnits($attributes, $this->location->getValue('testUser'));
-				#echo('<pre>'); print_r($attributes); exit;
+				$attributes = $this->addOrgAttributes($attributes);
+
 				$result['getTestOrg'] = array(TRUE,$tester->tack('getTestOrg'));
 				$result['getTestOrg']['time'] = $tester->tack('getTestOrg', FALSE); 
 			} catch(Exception $e) {