Jump to content

sistem80

Members
  • Posts

    2
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

sistem80's Achievements

Newbie

Newbie (1/4)

1

Reputation

  1. hi. I made this way so that other users can switch automatically procedure TUniMainModule.UniGUIMainModuleBeforeLogin(Sender: TObject; var Handled: Boolean); var S1,S2:string; begin S1 := (Sender as TUniGUISession).UniApplication.Cookies.Values['_loginname']; S2 := (Sender as TUniGUISession).UniApplication.Cookies.Values['_pwd']; loginQuery.SQL.Text := 'SELECT USERNAME, PASS FROM KULLAN WHERE USERNAME=:USERNAME AND PASS=:PASS'; loginQuery.Params.ParamByName('USERNAME').Value := S1; loginQuery.Params.ParamByName('PASS').Value := S2; UniMainModule.loginQuery.Open; if not UniMainModule.loginQuery.IsEmpty then begin Handled := SameText(S1,S1) and SameText(S2,S2); if Handled then LoggedUser := S1; end; end; log out UniApplication.Cookies.SetCookie('_loginname','',Date-1); UniApplication.Cookies.SetCookie('_pwd','',Date-1); UniApplication.Restart;
×
×
  • Create New...