getIndex(),rawurlencode($request['dn']))); die(); } if (! $request['dn'] || ! $app['server']->dnExists($request['dn'])) error(sprintf(_('The entry (%s) does not exist.'),$request['dn']),'error','index.php'); $request['page'] = new PageRender($app['server']->getIndex(),get_request('template','REQUEST',false,'none')); $request['page']->setDN($request['dn']); $request['page']->accept(); $request['template'] = $request['page']->getTemplate(); # Perform the modification $result = $app['server']->modify($request['dn'],$request['template']->getLDAPmodify()); if ($result) { # Fire the post modification event to the user's custom callback function. $mustRelogin = false; foreach ($request['template']->getLDAPmodify() as $attr_name => $val) { /* Was this a user's password modification who is currently * logged in? If so, they need to logout and log back in * with the new password. */ if (($attr_name == 'userpassword') && in_array($app['server']->getValue('login','auth_type'),array('cookie','session')) && pla_compare_dns($app['server']->getLogin(),$request['dn']) === 0) $mustRelogin = true; } # If the user password was changed, not tell the to relogin. if ($mustRelogin) { $app['server']->logout('user'); unset_lastactivity($app['server']); echo '
'; echo '