public function getUser($inUsername, $inCol, &$outUser) { $ldapArray = array(); $tempResult = array(); $ldapResults = null; $ldapResults = $this->search('o=svsu', "(cn={$inUsername})", $inCol); if ($ldapResults !== null && array_key_exists(0, $ldapResults)) { foreach ($ldapResults[0] as $key => $value) { if (!is_numeric($key)) { $ldapArray[$key] = is_array($value) ? $value[0] : $value; $ldapArray[$key] = parent::translateValue($ldapArray[$key]); } } $outUser = $ldapArray; } return $this; }
public function getUser($inID, $inCol, &$outUser) { // Look for a user with the given id in the xtac table and the users2keep // table. If it exists in either, send it out as $outUser $xtacResults = array(); $users2keepResults = array(); $xmtdResults = array(); $results = array(); $xtacResults = $this->query('xtac', "PersonID = {$inID}", '', $inCol); $users2keepResults = $this->query('users2keep', "ID like {$inID}", '', 'ID as PersonID, Login'); $xmtdResults = $this->query('xmtd', "ID like {$inID}", '', 'ID as PersonID, Login'); $results = array_merge($xtacResults, $users2keepResults, $xmtdResults); foreach ($results[0] as $key => $value) { $outUser[$key] = parent::translateValue($value); } return $this; }