#1 2011-11-29 14:12:23

corchi72
Member
Registered: 2010-12-10
Posts: 232

how can I implement the class TSQLAuthUser

Sorry I have decided to use the access session and then I convert my current class in TSQLUser TSQLAuthUser.
I tried to derive my class TSQLUser = Class (TSQLAuthUser) but does not work, so now I decided to change the current class TSQLAuthUser to add the fields Name, Last Name and Email etc. ...
The question is what is the right solution to implement the class and the class TSQLAuthUser TSQLAuthGroup?

Thanks corchi72

Offline

#2 2011-11-29 15:30:17

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: how can I implement the class TSQLAuthUser

The TSQLAuthUser is used internally for authentication and session handling at connection level.
This class is a "standard/common" class, and shall not be modified by application code.

In fact, this type is not designed to match the "User" at the application level.

You may be confused that e.g. in AJAX applications, a user password is used to open a session and a cookie.
But there is no direct link between authentication session and end-user in our framework, on purpose.

So do not change nor the TSQLAuthUser nor the TSQLAuthGroup class.
But create your own TSQLUser class, refering to TSQLAuthUser if you want to.

Online

#3 2011-11-29 15:49:41

corchi72
Member
Registered: 2010-12-10
Posts: 232

Re: how can I implement the class TSQLAuthUser

ok thanks. but it means that when I create a user in the class  TSQLUser then I have to create it TSQLAuthUser in the class? The new class must be written as:

TSQLUser = Class(TSQLFile)
public
AuthUser :TSQLAuthUser //that I use for the connection?
end

Offline

#4 2011-11-29 16:24:58

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: how can I implement the class TSQLAuthUser

Exactly!

smile

Online

#5 2011-11-29 16:53:38

corchi72
Member
Registered: 2010-12-10
Posts: 232

Re: how can I implement the class TSQLAuthUser

but I must insert manually the users into the table AuthUser or exist a form with the loginform?

Offline

#6 2011-11-30 10:12:16

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: how can I implement the class TSQLAuthUser

You have a login form already available, named SQLite3UILogin.pas.

But the login logic is to be implemented in your own code.

Online

Board footer

Powered by FluxBB