Last modified 2 years ago Last modified on 2012-07-05 18:46:25

Custom Login


This component provides a customisable version of the standard login dialog.


Public Methods

$userName:=LOGIN_User_identification 

$skipUserStartupMethod:=True
$keepRunningAfterCancel:= True
$includeDesignerInList:= True
$displayLanguageSelector:= True

$userName:=LOGIN_User_identification (\
$skipUserStartupMethod;\
$keepRunningAfterCancel;\
$includeDesignerInList;\
$displayLanguageSelector)

All arguments are optional and False by default.


Instructions

Create a new user with no password. In the example, this user is named "Default". Select that user as the default user in Database Settings/Security. Create a per-user startup method for the default user which calls the component method. Define a password for the Designer to activate the password system. Restart the application.

Options

skipUserStartupMethod

Passing True to this argument will skip the execution of the per-user startup method when authentication succeeds.

keepRunningAfterCancel

Passing True to this argument will not quit the application if the login dialog is cancelled. The default behaviour is to quit if the dialog is dismissed.

includeDesignerInList

Passing True to this argument will include the privileged users (Designer and Administrator) in the list. The default behaviour is to exclude them.

displayLanguageSelector

Passing True to this argument will display a localization selector widget (English, French, German, Japanese). The default behavior is not allow the user to change the interface language.

Note: When the default user feature is activated, the application always run in custom menu mode, even if the user had access rights to design mode. To enter design mode, one must launch the application by holding down the shift key and use the standard login dialog. See documentation of CHANGE CURRENT USER for details.

Tweaks

The component does not use the deprecated %password font. To use a different character for bullets, go to the "password" project from and change the following line;

$U25CF:=Char(0x25CF)
$passwordBullet:=$U25CF

The vibration logic is encapsulated in the "vibrate" widget. Simply assigning a new value (or even the current value) will trigger the On Bound Variable Change event, which in turn will trigger the vibration effect.

C_BOOLEAN($1)

$Vibrate:=OBJECT Get pointer(Object named;"Vibrate")

$Vibrate->:=Num($1)

You can change the "4D" icon by editing the "Header" project form.

The user list responds to events on the password field. More specifically, an up/down arrow key will change the selected user in list, while the focus remains in the password field. In addition, unlike the standard login dialog, one can't unselect a user in the list by clicking below the last item in list (which can lead to unexpected problems).


DOWNLOAD

v12 Component


SCREENSHOT


Attachments