public function LdapTestFunctions::generateUserLDAPAttributes in Lightweight Directory Access Protocol (LDAP) 8.2
Same name and namespace in other branches
- 7.2 ldap_test/LdapTestFunctions.class.php \LdapTestFunctions::generateUserLDAPAttributes()
1 call to LdapTestFunctions::generateUserLDAPAttributes()
- LdapTestFunctions::populateFakeLdapServerData in ldap_test/
LdapTestFunctions.class.php - set variable with fake test data
File
- ldap_test/
LdapTestFunctions.class.php, line 276
Class
Code
public function generateUserLDAPAttributes($test_ldap_id, $user) {
$attributes = array(
'cn' => array(
0 => $user['cn'],
'count' => 1,
),
'mail' => array(
0 => $user['cn'] . '@' . $this->csvTables['conf'][$test_ldap_id]['mailhostname'],
'count' => 1,
),
'uid' => array(
0 => $user['uid'],
'count' => 1,
),
'guid' => array(
0 => $user['guid'],
'count' => 1,
),
'sn' => array(
0 => $user['lname'],
'count' => 1,
),
'givenname' => array(
0 => $user['fname'],
'count' => 1,
),
'house' => array(
0 => $user['house'],
'count' => 1,
),
'department' => array(
0 => $user['department'],
'count' => 1,
),
'faculty' => array(
0 => (int) (bool) $user['faculty'],
'count' => 1,
),
'staff' => array(
0 => (int) (bool) $user['staff'],
'count' => 1,
),
'student' => array(
0 => (int) (bool) $user['student'],
'count' => 1,
),
'gpa' => array(
0 => $user['gpa'],
'count' => 1,
),
'probation' => array(
0 => (int) (bool) $user['probation'],
'count' => 1,
),
'password' => array(
0 => 'goodpwd',
'count' => 1,
),
);
return $attributes;
}