aLogin2 Configuration Properties
The properties of this object define the characteristics of the login process.
|loginDiv||ID attribute of div tag that will contain the login interface. If set to blank in the configuration object the user will have to construct the interface using the API calls available.||"login_container"|
|border||Place ExtJS border around the login interface. Only relevant if loginDiv is defined.||true|
|callback||Function that should get the results of changes to the login status. If not provided, the results will never be passed back to the application.|
|instance||A string that identifies this particular instance of the aLoginObject. Irrelevant unless the application is creating more than one instance. It's unclear why this would ever be done.|
|success||Message to display on successful login||"Login was successful"|
|failure||Message to display on login failure||"Login failed"|
|newAccounts||Can users create new accounts. If false the option will not appear in the login interface.||true|
Can the user change passwords. If true, a change password option will appear in the login window.
Note that the user can't change the password until he's logged in. Even if there is a default user defined, only users who log in can change the password.
|newAccountMessage||Text for new account button. This can contain html. For example: "New Account: <i>Limited rights</i>"||"New Account"|
|language||Language to use for the interfaces.||"English"|
|defaultLevel||The authority level assigned to new users. In general this should be low. Persons requesting an authority level lower than this will get it automatically. Persons requesting a higher level will get the default and an email message will be sent to the administrator notifying them of the request.||0|
This is only of use if allowing for new account requests.
An array of arrays for different authority levels and their titles. This is used in creating the field users use to request an authority level and allows the renaming of the levels. If no array is provided, users will not be allowed to ask for a different level and will get the default level. In setting up this array you should keep in mind the requirements of the application. This example shows this array set up in a way that's compatible with aBlog.
levelArray = [
|helpMessage||Text string offering help on picking authority level.||'No help available'|
|sessionLogin||Causes the normal login interface to be skipped. This assumes that the login process has been localized by modification of the localLoginChecks.php file to extract the username/password from session variables. See localization example in aLogin2 documentation.||False|
|localArray||Array of values that will be passed to the localization functions. See the Localization page for more on how to localize you authentication process.||Empty array|
The callback function can be complicated since it must be in a form that the login object understands. So, for instance, if your application object wants the return to go to an internal function called "acceptLogin", the callback can not be "acceptLogin" or "this.acceptLogin" since neither of these mean anything to the aLoginObject. Instead, you can create a global variable called myApp and point it at your application, then you can pass "myApp.acceptLogin".