Skip to content
Snippets Groups Projects
Commit 34a09097 authored by Peter Rotich's avatar Peter Rotich
Browse files

Merge pull request #330 from greezybacon/issue/auth-dn-with-spaces


auth: Fixup remote user lookup with spaces in DN

Reviewed-By: default avatarPeter Rotich <peter@osticket.com>
parents 507aa005 ffabbb79
No related branches found
No related tags found
No related merge requests found
......@@ -127,8 +127,9 @@ class UsersAjaxAPI extends AjaxController {
$user_info = $backend->lookup($id);
$form = UserForm::getUserForm()->getForm($user_info);
$info = array('title' => 'Import Remote User');
if (!$user_info)
$info = array('error' => 'Unable to find user in directory');
$info['error'] = 'Unable to find user in directory';
include(STAFFINC_DIR . 'templates/user-lookup.tmpl.php');
}
......
......@@ -80,7 +80,7 @@ $(function() {
},
onselect: function (obj) {
$('#the-lookup-form').load(
'<?php echo $info['onselect']? $info['onselect']: "ajax.php/users/select/"; ?>'+obj.id
'<?php echo $info['onselect']? $info['onselect']: "ajax.php/users/select/"; ?>'+encodeURIComponent(obj.id)
);
},
property: "/bin/true"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment