diff options
author | Timotheus Pokorra <tp@tbits.net> | 2015-06-12 12:01:27 +0200 |
---|---|---|
committer | Timotheus Pokorra <tp@tbits.net> | 2015-06-12 12:01:27 +0200 |
commit | 69d588e56a64d5bdf59cb0d826041186e7c90777 (patch) | |
tree | dd7e90e233a44c4170d2b97353de9a58d9de3407 | |
parent | b28fc81bcfa19a1e11f2ebcf6fefa2b4830c06bc (diff) | |
download | webadmin-69d588e56a64d5bdf59cb0d826041186e7c90777.tar.gz |
domain_delete.php: fix authentication (#5097)
need to set the SESSION['user'] object properly
-rw-r--r-- | bin/domain_delete.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bin/domain_delete.php b/bin/domain_delete.php index 74889cf..7f3a05e 100644 --- a/bin/domain_delete.php +++ b/bin/domain_delete.php @@ -34,7 +34,11 @@ $username = $CONF->get('ldap', 'bind_dn'); $password = $CONF->get('ldap', 'bind_pw'); $domain = $CONF->get('kolab', 'primary_domain'); -$LDAP->authenticate($username, $password, $domain); +// see https://cgit.kolab.org/webadmin/tree/lib/kolab_api_controller.php#n292 +session_start(); +$_SESSION['user'] = new User(); +$attributes = array(); +$_SESSION['user']->authenticate($username, $password, $domain, $attributes); // get list of domains to delete $domains = list_deleted_domains(); |