--- Cyrsql.php.orig	2011-04-03 16:30:31.000000000 +0300
+++ Cyrsql.php	2011-04-03 16:29:02.000000000 +0300
@@ -346,14 +346,14 @@
         if (!empty($this->_params['domain_field']) &&
             ($this->_params['domain_field'] != 'none')) {
             foreach ($result as $ar) {
-                if (!in_array($ar[0], $this->_params['hidden_accounts'])) {
-                    $users[] = $ar[0] . '@' . $ar[1];
+                if (!in_array($ar[$this->_params['username_field']], $this->_params['hidden_accounts'])) {
+                    $users[] = $ar[$this->_params['username_field']] . '@' . $ar[$this->_params['domain_field']];
                 }
             }
         } else {
             foreach ($result as $ar) {
-                if (!in_array($ar[0], $this->_params['hidden_accounts'])) {
-                    $users[] = $ar[0];
+                if (!in_array($ar[$this->_params['username_field']], $this->_params['hidden_accounts'])) {
+                    $users[] = $ar[$this->_params['username_field']];
                 }
             }
         }