uniGUI Component Reference Manual
Close
TUniGUIServerModule.OnControlPanelLogin Event
Syntax
Pascal
C++
property OnControlPanelLogin: TUniControlPanelLoginEvent;

This events is triggered when someone attempts to log into the uniGUI Server Control Panel. 

uniGUI provides the login form, but the validation is executed by the event handler based on the username, password, and login attempts. The login success is reported back in the variable LoginValid.

In this simple example the user will have 3 opportunities to provide the correct credentials (admin, password). 

 

procedure TUniServerModule.UniGUIServerModuleControlPanelLogin( ASession: TUniGUISession; const Auser, APassword: string; var LoginValid: Boolean; LoginAttempt: Integer); begin LoginValid := (LoginAttempt < 3) and (Auser = 'admin') and (APassword = 'password'); end;
Copyright (c) 2009 - 2019 FMSoft Ltd. All rights reserved.