Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating Object in Code - Basics
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00461449
Message ID:
00461756
Vues:
12
Barbara;

I wanted to make sure a user didn't have a shortcut to a page in the middle of my application. At most 'screens', I call CheckLogin() which grabs a UserID cookie created at login, checks it against a user table and uses SCATTER NAME objname to publish the user info to object properties, which can then be read by the calling function. If the calling function finds a blank objname.UserCode I know they're not properly logged in and I redirect them to the login screen.

Every user in this app must register (available at the login screen), so it's pretty much like your session table I suspect - except I never clear it out.

Please let me know if I did anything stupid or dangerous ....

Thanks

>Michael,
>What did you come up with? I'm using a session table with fields for all of the properties I need and storing the session ID as a hidden variable. Linked with a timeout procedure and an occasional sweep through the table to blank records that have timed out it's working fine.
>
>The client didn't want cookies or anything similar left on the users' computers, so it had to be a table.
>
>Barbara
>
>>Nevermind - I worked it out.
>>
>>>I've been using VISUAL Object Properties to hold values for a little while, but now I find I'd like to create one in code (since I'm doing web applications, there are really no visual objects I need to use).
>>>
>>>What I'd like to do is have a central function I can use to populate object properties user-specific values (user pkey, access level, fullname, etc.) that I can pull from my user table - so that I can call this function from most of my other functions. Of course, these values need to be isolated from other calls by other users.
>>>
>>>First, I don't really know whether to create the object in the common function or in the calling function. Second, I'm not sure of the syntax used in each of the functions....
>>>
>>>Some pseudo-code would be nice...
>>>
>>>I happen to be using WWWC.
>>>
>>>TIA
>>>Michael
Kogo Michael Hogan

"Pinky, are you pondering what I'm pondering?"
I think so Brain, but "Snowball for Windows"?

Ideate Web Site
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform