Link to home
Start Free TrialLog in
Avatar of IntelligentResponse
IntelligentResponseFlag for United States of America

asked on

A typical User class

I would like to create a User Object that is able to login to a site, and administer (add, delete, update) the user account.

What are the typical Properties and Methods (attributes and operations) that would make-up such an object? This is a web application.

There are many different ways one could do this, but what would be a good OOP approach?
SOLUTION
Avatar of Alan Warren
Alan Warren
Flag of Philippines image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of IntelligentResponse

ASKER

Probably a bit too much, just want the very basics. How does it deal with a User that is not a member, and still needs to register?
If a user attempts to access a restricted page, the .net membership server redirects the user to the login page, at which point they can either login or sign up.

Alan
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Just make sure when you're storing those passwords you're storing them as a salted hash. See my comment above.
I also accepted my own comment because understanding the concept of what an object should be allows one to go further than preexisting examples, however, having real-life examples (Microsoft's Membership Class) allows one to see how the experts do it, though they tend to be geared mainly towards the advanced corporate environment, and for the most part my needs are at the basic to intermediate level.

Alan:
In response to your 2 questions, the passwords will be stored in SQL Server, and it is likely that I will need to determine user activity online.