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

How to add user programmatically

edited April 2016 in Mods and Customizations

I'm new in osTicket and at this stage I just installed a copy for testing. My current context to explain my goal: I'm a software author and after some years managing my support through simple email (quite hard sometimes), I decided to switch to a real support platform (sure, I'll sleep better).

My users buy support through yearly membership and I would like to automatically add (and remove) them in realtime (on post-order) when they purchase or renew. I can write a CGI (in Perl or C in my case) to read my customers database and write the relevant info into the osTicket one, but I would like to know if this kind of "hack" (bypasing the osTicket board) will generate some side-effects I have not in mind?

And what are the table(s) and fields to fill-in to achieve a complete and clean registration? The goal being they'll have not to register by themselves (anyway, I will remove the possibility to sign-up by hand or submit a ticket as guest).




  • Moving thread to Mods and Customizations.
  • OK (y)
  • I created then validated (replying to confirmation email) a new user through the interface, then compared database dump before and after. It sounds like three tables are modified only. It may help someone else...


    Attached if the result of "diff -y --suppress-common-lines osticket_before.sql osticket_after.sql > diff.txt"
  • I use this php to add users
    look a little before execute, because i made it to my needs. you need to put the correct password for your db, modify the users to add, add a mail element in the array (i dont use that because all the mails are in my case), modify the language, etc
    sorry for my bad english and for some comments in the code in spanish
    to use it, you need to rename it to .php (because i can attach a file with that extension)
    then you need to put the files "class.passwd.php" and "PasswordHash.php" in the same folder. this files you can find it in "osTicket_installation_folder\include"
    to execute the file, put it in your apache folder and just open the direction in a web browser
Sign In or Register to comment.