. * * For more information, contact Colosa Inc, 2566 Le Jeune Rd., * Coral Gables, FL, 33134, USA, or email info@colosa.com. * */ global $RBAC; if ($RBAC->userCanAccess('PM_SETUP_ADVANCE') != 1) { G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels'); G::header('location: ../login/login'); die; } unset($_POST['form']['btnSave']); $aCommonFields = array('AUTH_SOURCE_UID', 'AUTH_SOURCE_NAME', 'AUTH_SOURCE_PROVIDER', 'AUTH_SOURCE_SERVER_NAME', 'AUTH_SOURCE_PORT', 'AUTH_SOURCE_ENABLED_TLS', 'AUTH_ANONYMOUS', 'AUTH_SOURCE_SEARCH_USER', 'AUTH_SOURCE_PASSWORD', 'AUTH_SOURCE_VERSION', 'AUTH_SOURCE_BASE_DN', 'AUTH_SOURCE_OBJECT_CLASSES', 'AUTH_SOURCE_ATTRIBUTES'); $aFields = $aData = array(); foreach ($_POST['form'] as $sField => $sValue) { if (in_array($sField, $aCommonFields)) { $aFields[$sField] = $sValue; } else { $aData[$sField] = $sValue; } } $aFields['AUTH_SOURCE_DATA'] = $aData; if ($aFields['AUTH_SOURCE_UID'] == '') { $RBAC->createAuthSource($aFields); } else { $RBAC->updateAuthSource($aFields); } G::header('location: authSources_List');