C# Class PERMWebSolution.Models.User

Show file Open project: VK-EIF/PERM-WEB-SOURCE Class Usage Examples

Public Methods

Method Description
User ( ) : System

Empty constructor

User ( string sessionID ) : System

User ( string uName, string uPassword ) : System

Constructo that accepts User and assigns to local class variable

changeUserPassword ( string password, string key ) : bool

Method changes user password

chekUserSession ( ) : bool

Method checks if the session id is valid

isUserNameExists ( string uName ) : bool

Checks userName is already present in database

logInUser ( ) : string

Method checks if user is registered.

saveUser ( User user ) : bool

User add method

setUpPasswordChange ( string emailFrom, string emailTo, string SMTP, string host, string port ) : bool

Sets up password change procedure

Private Methods

Method Description
checkUser ( ) : bool

Checks if user that have provide password is stored in database

Method Details

User() public method

Empty constructor
public User ( ) : System
return System

User() public method

public User ( string sessionID ) : System
sessionID string
return System

User() public method

Constructo that accepts User and assigns to local class variable
public User ( string uName, string uPassword ) : System
uName string
uPassword string
return System

changeUserPassword() public method

Method changes user password
public changeUserPassword ( string password, string key ) : bool
password string new pasword to be stored
key string key value indicating that user requested password change
return bool

chekUserSession() public method

Method checks if the session id is valid
public chekUserSession ( ) : bool
return bool

isUserNameExists() public method

Checks userName is already present in database
public isUserNameExists ( string uName ) : bool
uName string
return bool

logInUser() public method

Method checks if user is registered.
public logInUser ( ) : string
return string

saveUser() public method

User add method
public saveUser ( User user ) : bool
user User variable type of user
return bool

setUpPasswordChange() public method

Sets up password change procedure
public setUpPasswordChange ( string emailFrom, string emailTo, string SMTP, string host, string port ) : bool
emailFrom string From section email adress
emailTo string To whom emai will be sent
SMTP string SMTP server name
host string URI host
port string port on which site runs
return bool