Validates a User's credentials against the Data Store, and sets the Forms Authentication Ticket

Namespace: DotNetNuke.Entities.Users
Assembly: DotNetNuke (in DotNetNuke.dll)

Syntax

C#
public static UserInfo UserLogin(
	int portalId,
	string username,
	string password,
	string verificationCode,
	string portalName,
	string ip,
	ref UserLoginStatus loginStatus,
	bool createPersistentCookie
)
Visual Basic
Public Shared Function UserLogin ( 
	portalId As Integer,
	username As String,
	password As String,
	verificationCode As String,
	portalName As String,
	ip As String,
	ByRef loginStatus As UserLoginStatus,
	createPersistentCookie As Boolean
) As UserInfo

Parameters

portalId
Type: System..::..Int32
The Id of the Portal the user belongs to
username
Type: System..::..String
The user name of the User attempting to log in
password
Type: System..::..String
The password of the User attempting to log in
verificationCode
Type: System..::..String
The verification code of the User attempting to log in
portalName
Type: System..::..String
The name of the Portal
ip
Type: System..::..String
The IP Address of the user attempting to log in
loginStatus
Type: DotNetNuke.Security.Membership..::..UserLoginStatus%
A UserLoginStatus enumeration that indicates the status of the Login attempt. This value is returned by reference.
createPersistentCookie
Type: System..::..Boolean
A flag that indicates whether the login credentials should be persisted.

Return Value

The UserInfo object representing a successful login

See Also