Jump to content

UnimLoginForm:How to add a judge before call UnimLoginForm?


55143681

Recommended Posts

Dear:

In my project,I create a "Mobile Login Form" and use it to login,

now,some other website maybe call me with a "code" url,such as "https://127.0.0.1/8077/m&code=SLKJDFJJFDSAJ"

if the code is right,I will enter my main Page without login action.

if the code is not right,I will call the "Mobile Login Form".

How to add a judge before call my "Mobile Login Form",I wll read the url first and judge the url parameter,

if the "code" parameter is right,the user will enter the main page,

if the "code" parameter is not right,ther user will have to use "Mobile Login Form" to enter his username and password?

 

Link to comment
Share on other sites

  • 55143681 changed the title to UnimLoginForm:How to add a judge before call UnimLoginForm?
1 hour ago, 55143681 said:

Dear:

In my project,I create a "Mobile Login Form" and use it to login,

now,some other website maybe call me with a "code" url,such as "https://127.0.0.1/8077/m&code=SLKJDFJJFDSAJ"

if the code is right,I will enter my main Page without login action.

if the code is not right,I will call the "Mobile Login Form".

How to add a judge before call my "Mobile Login Form",I wll read the url first and judge the url parameter,

if the "code" parameter is right,the user will enter the main page,

if the "code" parameter is not right,ther user will have to use "Mobile Login Form" to enter his username and password?

 

Hello 

You can use UniMainModule.OnBeforeLogin

 

procedure TUniMainModule.UniGUIMainModuleBeforeLogin(Sender: TObject;
  var Handled: Boolean);
begin
 if TUniGUIApplication(UniApplication).Parameters.Values ['code']='SLKJDFJJFDSAJ' then
   Handled:= True;
end;

 

Link to comment
Share on other sites

2 hours ago, Hayri ASLAN said:

Hello 

You can use UniMainModule.OnBeforeLogin

 

procedure TUniMainModule.UniGUIMainModuleBeforeLogin(Sender: TObject;
  var Handled: Boolean);
begin
 if TUniGUIApplication(UniApplication).Parameters.Values ['code']='SLKJDFJJFDSAJ' then
   Handled:= True;
end;

 

Tank you very much.

Hayri ASLAN

Link to comment
Share on other sites

×
×
  • Create New...