index 4880f71979a70960fb0a1a11a048c2858f6eb98c..954231dfe3890fb26f4f2ac3bfc8018ab12c8700 100644 (file)
{
global $smarty;
+ $smarty->assign ("logo", image(get_template_path("images/logo.png")));
+ $smarty->assign ("date", date("l, dS F Y H:i:s O"));
$smarty->display(get_template_path('password.tpl'));
exit();
}
/* Parse configuration file */
$config= new config(CONFIG_DIR."/".CONFIG_FILE, $BASE_DIR);
+
+/* Generate server list */
+$servers= array();
+foreach ($config->data['LOCATIONS'] as $key => $ignored) {
+ $servers[$key]= $key;
+}
+
+if (isset($_POST['server'])) {
+ $directory= get_post('server');
+}elseif (isset($_GET['directory'])) {
+ $directory= $_GET['directory'];
+} else {
+ $directory= $config->data['MAIN']['DEFAULT'];
+ if (!isset($servers[$directory])) {
+ $directory = key($servers);
+ }
+
+}
+
+// Set location and reload the configRegistry - we've now access to the ldap.
+if(isset($servers[$directory])){
+ $config->set_current($directory);
+ $config->check_and_reload();
+ $config->configRegistry->reload(TRUE);
+}
+session::global_set('plist', new pluglist($config, $ui));
+
session::global_set('debugLevel', $config->get_cfg_value("core","debugLevel"));
if ($_SERVER["REQUEST_METHOD"] != "POST") {
@DEBUG(
bindtextdomain($domain, LOCALE_DIR);
textdomain($domain);
-/* Generate server list */
-$servers= array();
-foreach ($config->data['LOCATIONS'] as $key => $ignored) {
- $servers[$key]= $key;
-}
-if (isset($_POST['server'])) {
- $directory= validate($_POST['server']);
-} else {
- $directory= $config->data['MAIN']['DEFAULT'];
-
- if (!isset($servers[$directory])) {
- $directory = key($servers);
- }
-}
$smarty->assign ("title","GOsa");
if (isset($_GET['directory']) && isset($servers[$_GET['directory']])) {
$smarty->assign("show_directory_chooser", false);
$method= $config->get_cfg_value("core","passwordDefaultHash");
if (isset($_GET['method'])) {
$method= validate($_GET['method']);
- $tmp = new passwordMethod($config);
+ $tmp = new passwordMethod($config, "dummy");
$available = $tmp->get_available_methods();
if (!isset($available[$method])) {
msg_dialog::display(
$uid= validate($_GET['uid']);
$smarty->assign('display_username', false);
} elseif (isset($_POST['uid'])) {
- $uid= validate($_POST['uid']);
+ $uid= get_post('uid');
$smarty->assign('display_username', true);
} else {
$uid= "";
}
}
if(!passwordMethod::is_harmless($_POST['new_password'])){
- $message[]= _("The password contains possibly problematic unicode characters!");
+ $message[]= _("The password contains possibly problematic Unicode characters!");
}
/* Validate */
/* Do we have the selected user somewhere? */
$ui= ldap_login_user($uid, $current_password);
+ /* Load ocMapping into userinfo */
+ $tmp= new acl($config, NULL, $ui->dn);
+ $ui->ocMapping= $tmp->ocMapping;
+
+
+ $ui->loadACL();
+
if ($ui === NULL) {
$message[]= _("Please check the username/password combination!");
} else {