Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

Create client account on HTTP Pass-Through

Hi,

Is it possible to create a new client account automatically when a new client login via HTTP Pass-Through with LDAP?
I am looking at the code of the UserHttpAuthentication class in the HTTP- Pass-Through plugin and trying to figure how to create a new client account if it does not exist in the system



            else {
                // No such account. Attempt a lookup on the username
                $users = parent::searchUsers($username);
                if (!is_array($users))
                    return;

                foreach ($users as $u) {
                    if (0 === strcasecmp($u['username'], $username)
                            || 0 === strcasecmp($u['email'], $username))
                        // User information matches HTTP username
                        return new ClientCreateRequest($this, $username, $u);
                }
return new ClientCreateRequest($this, $username, $u);
            }


Any help would be appreciated.

Thanks a lot.

Comments

  • Sorry I haven't played with http pass-though at all [but have been meaning to].  Maybe one of the others who has will be able to give you a better answer.
  • That's all right, thank you for you reply.

    but would you be so kind to point me to the right direction on the simplest way to create a client account.?
    i tried to take a loot around, but things seems to complicated for me to understand.
    maybe i can do some trial and error. lol
  • Staff Panel -> Users -> Add User

    Or if you want to bulk create accounts Staff Panel -> Users -> Import
  • Thanks ntozier for your quick answer
    but what I meant was how to add it programmatically.

    But anyway, I've done it by a very dirty work around for now, i.e., directly write it into the database..



Sign In or Register to comment.