INFO: Handling users external SQL database

Hello sirs,
i would like to ask some detailed information about External User Database.

I’m using a custom sql table containing additional columns such as nation, gender, usercode, image and i would like to know how i can retrieve those infos with ignition functions.

Code:

Info_Utente = system.user.getUser("", Username)
print Info_Utente.getContactInfo() # Returns only User[username=XXX, firstname=null, lastname=null, roles=[Superuser]]

print Info_Utente.get(Info_Utente.FirstName) # Returns null
print Info_Utente.get(Info_Utente.LastName) # Returns null

Is there a way to retrieve all those custom user information that i have in the database ( language, nation, gender, usercode, image) with an internal function or should i query the Db with runPrepQuery?

Thank you,
N.

I don’t think it’s possible to extend the existing internal functions. I think you’ll need to run your own queries for those added fields.

2 Likes