See final return statement added to the addUser function below. This is the code from the ldap_sample.class.php file which is provided in the curent release.
if (is_array($this->source['defaultGroups'])) { foreach($this->source['defaultGroups'] as $gID) $newUser->addGroup($gID);
}
if (is_array($this->source['defaultRoles'])) { foreach($this->source['defaultRoles'] as $rID) $newUser->addRole($rID);
}
$newUser->save();
//Attention: The following return statement need added in order for this function to work correctly.
return true;
}
}
See final return statement added to the addUser function below. This is the code from the ldap_sample. class.php file which is provided in the curent release.
class ldap_sample extends AUTH_ldap /bender. terascala. com',
'user_ group' => 2,
'user_ role' => 2
'namePattern' => '%<email address hidden>',
'defaultGroups ' => array(11),
'defaultRoles' => array(10),
{
protected $source = array(
'url' => 'ldap:/
'defaults' => array(
),
'required' => true
);
public function addUser($username, $password, $sourceName = null)
{
/* @var $newUser PHPDS_importUser */ factory( 'PHPDS_ importUser' ); $this-> source[ 'defaults' ], $userData);
$newUser- >import( $userData) ;
$newUser = $this->
$userData = array('user_id' => 0, 'user_name' => $username, 'user_password'=> $sourceName);
$userData = array_merge(
if (is_array( $this-> source[ 'defaultGroups' ])) {
foreach( $this-> source[ 'defaultGroups' ] as $gID) $newUser- >addGroup( $gID); $this-> source[ 'defaultRoles' ])) {
foreach( $this-> source[ 'defaultRoles' ] as $rID) $newUser- >addRole( $rID);
}
if (is_array(
}
return true;
}
}