Acessing user name from standard login panel
Posted: Fri Mar 06, 2020 4:59 pm
I wish to take some action when the btn_Action on the standard login panel.
This action requires the user name of the user logging in.
As this panel is built on the fly (from a class) there is no simple way that I can find to access the user name that has been entered into the text field (i.e. I cannot simply user textfield.text as I do not know that textfield object name).
After quite a bit of searching through the login classes, I could not find a public method to return the user name, or a public user name variable in the LoginFrameworkView or LoginFrameworkController classes.
There is a OaAuthUI ptr that is part of the LoginFrameworkController class, which has a getUsername() method, which would save the day. However, it is private to the LoginFrameworkController class, so I can't use that.
I tried to make my own OaAuthUI ptr in the login panel, using the setOaAuthUI() method, but I could not get it to work.
So how can I get the user name of the user logging it inside the btn_Action script of the standard login panel?
This action requires the user name of the user logging in.
As this panel is built on the fly (from a class) there is no simple way that I can find to access the user name that has been entered into the text field (i.e. I cannot simply user textfield.text as I do not know that textfield object name).
After quite a bit of searching through the login classes, I could not find a public method to return the user name, or a public user name variable in the LoginFrameworkView or LoginFrameworkController classes.
There is a OaAuthUI ptr that is part of the LoginFrameworkController class, which has a getUsername() method, which would save the day. However, it is private to the LoginFrameworkController class, so I can't use that.
I tried to make my own OaAuthUI ptr in the login panel, using the setOaAuthUI() method, but I could not get it to work.
So how can I get the user name of the user logging it inside the btn_Action script of the standard login panel?