BUG 9717 I add attributes to ldap

I add attributes to ldap
This commit is contained in:
Brayan Osmar Pereyra Suxo
2012-11-05 09:57:09 -04:00
parent 96ff96b3f6
commit fdf3807521
5 changed files with 62 additions and 22 deletions

View File

@@ -45,28 +45,27 @@ try {
$dataset->next();
}
$aFields = $RBAC->getAuthSource( $_POST['sUID'] );
$aFields = $RBAC->getAuthSource( $_POST['sUID'] );
G::LoadThirdParty( 'pear/json', 'class.json' );
$oJSON = new Services_JSON();
$i = 0;
$oUser = new Users();
$aAux = $RBAC->searchUsers( $_POST['sUID'], $_POST['sKeyword'] );
$aUsers = array ();
// note added by gustavo cruz gustavo-at-colosa.com
// changed the user data showed to accept FirstName and LastName variables
// note added by gustavo cruz gustavo-at-colosa.com
// changed the user data showed to accept FirstName and LastName variables
$aUsers[] = array ('Checkbox' => 'char','Username' => 'char','FullName' => 'char','FirstName' => 'char','LastName' => 'char','Email' => 'char','DistinguishedName' => 'char'
);
foreach ($aAux as $aUser) {
if (! in_array( $aUser['sUsername'], $pmUsers )) {
// add replace to change D'Souza to D*Souza by krlos
// add replace to change D'Souza to D*Souza by krlos
$sCheckbox = '<div align="center"><input type="checkbox" name="aUsers[' . $i . ']" id="aUsers[' . $i . ']" value=\'' . str_replace( "\'", "*", addslashes( $oJSON->encode( $aUser ) ) ) . '\' /></div>';
$i ++;
} else {
$sCheckbox = G::LoadTranslation( 'ID_USER_REGISTERED' ) . ':<br />(' . $aUser['sUsername'] . ')';
}
// note added by gustavo cruz gustavo-at-colosa.com
// assign the user data to the DBArray variable.
// note added by gustavo cruz gustavo-at-colosa.com
// assign the user data to the DBArray variable.
$aUsers[] = array ('Checkbox' => $sCheckbox,'Username' => $aUser['sUsername'],'FullName' => $aUser['sFullname'],'FirstName' => $aUser['sFirstname'],'LastName' => $aUser['sLastname'],'Email' => $aUser['sEmail'],'DistinguishedName' => $aUser['sDN']
);
}
@@ -130,8 +129,8 @@ try {
echo '{sources: ' . G::json_encode( $aSources ) . ', total_sources: ' . $total_sources . '}';
break;
case 'canDeleteAuthSource':
//echo 'llego';
//require_once PATH_RBAC.'model/RbacUsers.php';
//echo 'llego';
//require_once PATH_RBAC.'model/RbacUsers.php';
try {
$authUID = $_POST['auth_uid'];
global $RBAC;