We use a script to fill the database directly with phone numbers etc. from ldap. I took the following code out of our script and set in some example values (phone number 555 666 7777 and username johndoe) so that you can see how you can select / update the phone number and other fields from an external script. But always remember that you're doing that on your own risk and when you like to use my ldap user info addon it's also at your own risk for sure! ;)
Here is the sql command:
update ost_user
LEFT JOIN ost_user_account on ost_user.id=ost_user_account.user_id
LEFT JOIN ost_form_entry on ost_user.id=ost_form_entry.object_id
LEFT JOIN ost_form_entry_values on ost_form_entry.id=ost_form_entry_values.entry_id
LEFT JOIN ost_form_field on ost_form_entry_values.field_id=ost_form_field.id
SET ost_form_entry_values.value='555 666 7777'
WHERE (ost_form_field.name='phone' AND ost_user_account.username='johndoe')";
My ldap user info addon script:
https://github.com/Chefkeks/osTicket-Addons
Thanks a lot. Helps me miles!:)