/** * Force synchronization of external repositories, such as the OBM LDAP directory, * with new informations provides by LemonLDAP. * User data are synchronized, like groups and user password. * @param $user_id * @param $domain_id * @param $username Login of the user */ protected function syncExternalData ($user_id, $domain_id, $username) { global $obm, $entities; // // $entities is defined into the file package.inc.php, from // this LemonLDAP library. It is temporary. // if (!$this->isEnabled()) { return false; } // // Fixe parameters. // $params['domain_id'] = $domain_id; $params['update_type'] = 'incremental'; $params['realm'] = 'domain'; $backup['uid'] = $obm['uid']; $obm['uid'] = $user_id; // // Launch external update. This could take few seconds. // set_update_lock(); set_update_state($domain_id); store_update_data($params); exec_tools_update_update($params); remove_update_lock(); $obm['uid'] = $backup['uid']; unset($backup); }
} elseif ($action == 'update_update') { /////////////////////////////////////////////////////////////////////////////// if (check_tools_update_context_ok($params)) { set_update_lock(); set_update_state($params['domain_id']); store_update_data($params); run_query_tools_init_progress(); $res = exec_tools_update_update($params); if ($res === 0) { $display['msg'] .= display_ok_msg($l_upd_running); $display['detail'] = dis_tools_update_detail(); remove_update_lock(); } else { $display['msg'] .= display_err_msg("$l_upd_error ($res)"); remove_update_lock(); $display['detail'] = dis_tools_update_detail(); } } else { // Si le contexte ne permet pas une modification de configuration $display['msg'] .= display_warn_msg($err['msg']); $display['detail'] = dis_tools_update_detail(); } } elseif ($action == 'halt_halt') { /////////////////////////////////////////////////////////////////////////////// $display['msg'] .= display_debug_msg($cmd_halt, $cdg_exe); $ret = exec($cmd_halt); } elseif($action == 'progress') { ///////////////////////////////////////////////////////////////////////////////