55143681 Posted November 20, 2021 Share Posted November 20, 2021 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 More sharing options...
Hayri ASLAN Posted November 21, 2021 Share Posted November 21, 2021 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 More sharing options...
55143681 Posted November 21, 2021 Author Share Posted November 21, 2021 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 More sharing options...
Recommended Posts