Class UserController
Inheritance
UserController
Assembly: DotNetNuke.dll
Syntax
public class UserController : ServiceLocator<IUserController, UserController>, IUserController
Constructors
UserController()
Declaration
Properties
Declaration
public string DisplayFormat { get; set; }
Property Value
PortalId
Declaration
public int PortalId { get; set; }
Property Value
Methods
AddUserPortal(int, int)
Declaration
public static void AddUserPortal(int portalId, int userId)
Parameters
Type |
Name |
Description |
int |
portalId |
|
int |
userId |
|
ApproveUser(UserInfo)
Declaration
public static void ApproveUser(UserInfo user)
Parameters
ChangePassword(UserInfo, string, string)
Declaration
public static bool ChangePassword(UserInfo user, string oldPassword, string newPassword)
Parameters
Returns
ChangePasswordByToken(int, string, string, string)
Declaration
public static bool ChangePasswordByToken(int portalid, string username, string newPassword, string resetToken)
Parameters
Returns
ChangePasswordByToken(int, string, string, string, string, out string)
Declaration
public static bool ChangePasswordByToken(int portalid, string username, string newPassword, string answer, string resetToken, out string errorMessage)
Parameters
Returns
ChangePasswordByToken(int, string, string, string, out string)
Declaration
[Obsolete("Deprecated in DotNetNuke 7.4.2. Use ChangePasswordByToken(int portalid, string username, string newPassword, string answer, string resetToken, out string errorMessage). Scheduled for removal in v10.0.0.")]
public static bool ChangePasswordByToken(int portalid, string username, string newPassword, string resetToken, out string errorMessage)
Parameters
Returns
ChangePasswordQuestionAndAnswer(UserInfo, string, string, string)
Declaration
public static bool ChangePasswordQuestionAndAnswer(UserInfo user, string password, string passwordQuestion, string passwordAnswer)
Parameters
Returns
ChangeUsername(int, string)
Declaration
public static void ChangeUsername(int userId, string newUsername)
Parameters
Type |
Name |
Description |
int |
userId |
|
string |
newUsername |
|
CheckInsecurePassword(string, string, ref UserLoginStatus)
Declaration
[Obsolete("Deprecated in DotNetNuke 9.8.1. No alternative method implemented. Scheduled for removal in v11.0.0.")]
public static void CheckInsecurePassword(string username, string password, ref UserLoginStatus loginStatus)
Parameters
CopyUserToPortal(UserInfo, PortalInfo, bool)
Declaration
public static void CopyUserToPortal(UserInfo user, PortalInfo destinationPortal, bool mergeUser)
Parameters
CreateUser(ref UserInfo)
Declaration
public static UserCreateStatus CreateUser(ref UserInfo user)
Parameters
Returns
CreateUser(ref UserInfo, bool)
Declaration
public static UserCreateStatus CreateUser(ref UserInfo user, bool sendEmailNotification)
Parameters
Type |
Name |
Description |
UserInfo |
user |
|
bool |
sendEmailNotification |
|
Returns
DeleteUnauthorizedUsers(int)
Declaration
public static void DeleteUnauthorizedUsers(int portalId)
Parameters
Type |
Name |
Description |
int |
portalId |
|
DeleteUser(ref UserInfo, bool, bool)
Declaration
public static bool DeleteUser(ref UserInfo user, bool notify, bool deleteAdmin)
Parameters
Returns
DeleteUsers(int, bool, bool)
Declaration
public static void DeleteUsers(int portalId, bool notify, bool deleteAdmin)
Parameters
Type |
Name |
Description |
int |
portalId |
|
bool |
notify |
|
bool |
deleteAdmin |
|
GeneratePassword()
Declaration
public static string GeneratePassword()
Returns
GeneratePassword(int)
Declaration
public static string GeneratePassword(int length)
Parameters
Type |
Name |
Description |
int |
length |
|
Returns
GetCachedUser(int, string)
Declaration
public static UserInfo GetCachedUser(int portalId, string username)
Parameters
Type |
Name |
Description |
int |
portalId |
|
string |
username |
|
Returns
GetDefaultUserSettings()
Declaration
public static Hashtable GetDefaultUserSettings()
Returns
GetDeletedUsers(int)
Declaration
public static ArrayList GetDeletedUsers(int portalId)
Parameters
Type |
Name |
Description |
int |
portalId |
|
Returns
GetDuplicateEmailCount()
Declaration
public static int GetDuplicateEmailCount()
Returns
GetFactory()
Declaration
protected override Func<IUserController> GetFactory()
Returns
Overrides
GetOnlineUsers(int)
Declaration
[Obsolete("Deprecated in DotNetNuke 8.0.0. Other solutions exist outside of the DNN Platform. Scheduled for removal in v11.0.0.")]
public static ArrayList GetOnlineUsers(int portalId)
Parameters
Type |
Name |
Description |
int |
portalId |
|
Returns
GetPassword(ref UserInfo, string)
Declaration
public static string GetPassword(ref UserInfo user, string passwordAnswer)
Parameters
Returns
GetProfileAvatarAbsoluteUrl(int, UserInfo, int, int, bool)
Declaration
public static string GetProfileAvatarAbsoluteUrl(int portalId, UserInfo user, int width = 64, int height = 64, bool showSuperUsers = true)
Parameters
Returns
GetUnAuthorizedUsers(int)
Declaration
public static ArrayList GetUnAuthorizedUsers(int portalId)
Parameters
Type |
Name |
Description |
int |
portalId |
|
Returns
GetUnAuthorizedUsers(int, bool, bool)
Declaration
public static ArrayList GetUnAuthorizedUsers(int portalId, bool includeDeleted, bool superUsersOnly)
Parameters
Type |
Name |
Description |
int |
portalId |
|
bool |
includeDeleted |
|
bool |
superUsersOnly |
|
Returns
GetUser(int, int)
Declaration
public UserInfo GetUser(int portalId, int userId)
Parameters
Type |
Name |
Description |
int |
portalId |
|
int |
userId |
|
Returns
GetUserByDisplayname(int, string)
Declaration
public UserInfo GetUserByDisplayname(int portalId, string displayName)
Parameters
Type |
Name |
Description |
int |
portalId |
|
string |
displayName |
|
Returns
GetUserByEmail(int, string)
Declaration
public static UserInfo GetUserByEmail(int portalId, string emailToMatch)
Parameters
Type |
Name |
Description |
int |
portalId |
|
string |
emailToMatch |
|
Returns
GetUserById(int, int)
Declaration
public static UserInfo GetUserById(int portalId, int userId)
Parameters
Type |
Name |
Description |
int |
portalId |
|
int |
userId |
|
Returns
GetUserByName(int, string)
Declaration
public static UserInfo GetUserByName(int portalId, string username)
Parameters
Type |
Name |
Description |
int |
portalId |
|
string |
username |
|
Returns
GetUserByName(string)
Declaration
public static UserInfo GetUserByName(string username)
Parameters
Type |
Name |
Description |
string |
username |
|
Returns
GetUserByPasswordResetToken(int, string)
Declaration
public static UserInfo GetUserByPasswordResetToken(int portalId, string resetToken)
Parameters
Type |
Name |
Description |
int |
portalId |
|
string |
resetToken |
|
Returns
GetUserByVanityUrl(int, string)
Declaration
public static UserInfo GetUserByVanityUrl(int portalId, string vanityUrl)
Parameters
Type |
Name |
Description |
int |
portalId |
|
string |
vanityUrl |
|
Returns
GetUserCountByPortal(int)
Declaration
public static int GetUserCountByPortal(int portalId)
Parameters
Type |
Name |
Description |
int |
portalId |
|
Returns
GetUserCreateStatus(UserCreateStatus)
Declaration
public static string GetUserCreateStatus(UserCreateStatus userRegistrationStatus)
Parameters
Returns
GetUserMembership(UserInfo)
Declaration
public static void GetUserMembership(UserInfo user)
Parameters
GetUserProfilePictureUrl(int, int, int)
Declaration
public string GetUserProfilePictureUrl(int userId, int width, int height)
Parameters
Type |
Name |
Description |
int |
userId |
|
int |
width |
|
int |
height |
|
Returns
GetUserProfilePictureUrl(int, int, int, int)
Declaration
public string GetUserProfilePictureUrl(int portalId, int userId, int width, int height)
Parameters
Type |
Name |
Description |
int |
portalId |
|
int |
userId |
|
int |
width |
|
int |
height |
|
Returns
GetUserSettings(int)
Declaration
public static Hashtable GetUserSettings(int portalId)
Parameters
Type |
Name |
Description |
int |
portalId |
|
Returns
GetUsers(bool, bool, int)
Declaration
public static ArrayList GetUsers(bool includeDeleted, bool superUsersOnly, int portalId)
Parameters
Type |
Name |
Description |
bool |
includeDeleted |
|
bool |
superUsersOnly |
|
int |
portalId |
|
Returns
GetUsers(int)
Declaration
public static ArrayList GetUsers(int portalId)
Parameters
Type |
Name |
Description |
int |
portalId |
|
Returns
GetUsers(int, int, int, ref int)
Declaration
public static ArrayList GetUsers(int portalId, int pageIndex, int pageSize, ref int totalRecords)
Parameters
Type |
Name |
Description |
int |
portalId |
|
int |
pageIndex |
|
int |
pageSize |
|
int |
totalRecords |
|
Returns
GetUsers(int, int, int, ref int, bool, bool)
Declaration
public static ArrayList GetUsers(int portalId, int pageIndex, int pageSize, ref int totalRecords, bool includeDeleted, bool superUsersOnly)
Parameters
Type |
Name |
Description |
int |
portalId |
|
int |
pageIndex |
|
int |
pageSize |
|
int |
totalRecords |
|
bool |
includeDeleted |
|
bool |
superUsersOnly |
|
Returns
GetUsersAdvancedSearch(int, int, int, int, int, bool, int, int, string, bool, string, string)
Declaration
public IList<UserInfo> GetUsersAdvancedSearch(int portalId, int userId, int filterUserId, int filterRoleId, int relationTypeId, bool isAdmin, int pageIndex, int pageSize, string sortColumn, bool sortAscending, string propertyNames, string propertyValues)
Parameters
Returns
GetUsersBasicSearch(int, int, int, string, bool, string, string)
Declaration
public IList<UserInfo> GetUsersBasicSearch(int portalId, int pageIndex, int pageSize, string sortColumn, bool sortAscending, string propertyName, string propertyValue)
Parameters
Returns
GetUsersByDisplayName(int, string, int, int, ref int, bool, bool)
Declaration
public static ArrayList GetUsersByDisplayName(int portalId, string nameToMatch, int pageIndex, int pageSize, ref int totalRecords, bool includeDeleted, bool superUsersOnly)
Parameters
Type |
Name |
Description |
int |
portalId |
|
string |
nameToMatch |
|
int |
pageIndex |
|
int |
pageSize |
|
int |
totalRecords |
|
bool |
includeDeleted |
|
bool |
superUsersOnly |
|
Returns
GetUsersByEmail(int, string, int, int, ref int)
Declaration
public static ArrayList GetUsersByEmail(int portalId, string emailToMatch, int pageIndex, int pageSize, ref int totalRecords)
Parameters
Type |
Name |
Description |
int |
portalId |
|
string |
emailToMatch |
|
int |
pageIndex |
|
int |
pageSize |
|
int |
totalRecords |
|
Returns
GetUsersByEmail(int, string, int, int, ref int, bool, bool)
Declaration
public static ArrayList GetUsersByEmail(int portalId, string emailToMatch, int pageIndex, int pageSize, ref int totalRecords, bool includeDeleted, bool superUsersOnly)
Parameters
Type |
Name |
Description |
int |
portalId |
|
string |
emailToMatch |
|
int |
pageIndex |
|
int |
pageSize |
|
int |
totalRecords |
|
bool |
includeDeleted |
|
bool |
superUsersOnly |
|
Returns
GetUsersByProfileProperty(int, string, string, int, int, ref int)
Declaration
public static ArrayList GetUsersByProfileProperty(int portalId, string propertyName, string propertyValue, int pageIndex, int pageSize, ref int totalRecords)
Parameters
Returns
GetUsersByProfileProperty(int, string, string, int, int, ref int, bool, bool)
Declaration
public static ArrayList GetUsersByProfileProperty(int portalId, string propertyName, string propertyValue, int pageIndex, int pageSize, ref int totalRecords, bool includeDeleted, bool superUsersOnly)
Parameters
Returns
GetUsersByUserName(int, string, int, int, ref int)
Declaration
public static ArrayList GetUsersByUserName(int portalId, string userNameToMatch, int pageIndex, int pageSize, ref int totalRecords)
Parameters
Type |
Name |
Description |
int |
portalId |
|
string |
userNameToMatch |
|
int |
pageIndex |
|
int |
pageSize |
|
int |
totalRecords |
|
Returns
GetUsersByUserName(int, string, int, int, ref int, bool, bool)
Declaration
public static ArrayList GetUsersByUserName(int portalId, string userNameToMatch, int pageIndex, int pageSize, ref int totalRecords, bool includeDeleted, bool superUsersOnly)
Parameters
Type |
Name |
Description |
int |
portalId |
|
string |
userNameToMatch |
|
int |
pageIndex |
|
int |
pageSize |
|
int |
totalRecords |
|
bool |
includeDeleted |
|
bool |
superUsersOnly |
|
Returns
IsValidUserName(string)
Declaration
public bool IsValidUserName(string userName)
Parameters
Type |
Name |
Description |
string |
userName |
|
Returns
MoveUserToPortal(UserInfo, PortalInfo, bool)
Declaration
public static void MoveUserToPortal(UserInfo user, PortalInfo portal, bool mergeUser)
Parameters
RemoveDeletedUsers(int)
Declaration
public static void RemoveDeletedUsers(int portalId)
Parameters
Type |
Name |
Description |
int |
portalId |
|
RemoveUser(UserInfo)
Declaration
public static bool RemoveUser(UserInfo user)
Parameters
Returns
ResetAndChangePassword(UserInfo, string)
Declaration
public static bool ResetAndChangePassword(UserInfo user, string newPassword)
Parameters
Returns
ResetAndChangePassword(UserInfo, string, string)
Declaration
public static bool ResetAndChangePassword(UserInfo user, string oldPassword, string newPassword)
Parameters
Returns
ResetPassword(UserInfo, string)
Declaration
public static string ResetPassword(UserInfo user, string passwordAnswer)
Parameters
Returns
ResetPasswordToken(UserInfo)
Declaration
public static void ResetPasswordToken(UserInfo user)
Parameters
ResetPasswordToken(UserInfo, bool)
Declaration
public static bool ResetPasswordToken(UserInfo user, bool sendEmail)
Parameters
Returns
ResetPasswordToken(UserInfo, int)
Declaration
public static void ResetPasswordToken(UserInfo user, int minutesValid)
Parameters
ResetTermsAgreement(int)
Declaration
public static void ResetTermsAgreement(int portalId)
Parameters
Type |
Name |
Description |
int |
portalId |
|
RestoreUser(ref UserInfo)
Declaration
public static bool RestoreUser(ref UserInfo user)
Parameters
Returns
SettingsKey(int)
Declaration
public static string SettingsKey(int portalId)
Parameters
Type |
Name |
Description |
int |
portalId |
|
Returns
UnLockUser(UserInfo)
Declaration
public static bool UnLockUser(UserInfo user)
Parameters
Returns
UpdateDisplayNames()
Declaration
public void UpdateDisplayNames()
UpdateUser(int, UserInfo)
Declaration
public static void UpdateUser(int portalId, UserInfo user)
Parameters
UpdateUser(int, UserInfo, bool)
Declaration
public static void UpdateUser(int portalId, UserInfo user, bool loggedAction)
Parameters
UpdateUser(int, UserInfo, bool, bool)
Declaration
public static void UpdateUser(int portalId, UserInfo user, bool loggedAction, bool sendNotification)
Parameters
UserAgreedToTerms(UserInfo)
Declaration
public static void UserAgreedToTerms(UserInfo user)
Parameters
UserLogin(int, UserInfo, string, string, bool)
Declaration
public static void UserLogin(int portalId, UserInfo user, string portalName, string ip, bool createPersistentCookie)
Parameters
UserLogin(int, string, string, string, string, string, ref UserLoginStatus, bool)
Declaration
public static UserInfo UserLogin(int portalId, string username, string password, string verificationCode, string portalName, string ip, ref UserLoginStatus loginStatus, bool createPersistentCookie)
Parameters
Returns
UserRequestsRemoval(UserInfo, bool)
Declaration
public static void UserRequestsRemoval(UserInfo user, bool remove)
Parameters
ValidatePassword(string)
Declaration
public static bool ValidatePassword(string password)
Parameters
Type |
Name |
Description |
string |
password |
|
Returns
ValidateUser(UserInfo, int, bool)
Declaration
public static UserValidStatus ValidateUser(UserInfo objUser, int portalId, bool ignoreExpiring)
Parameters
Returns
ValidateUser(int, string, string, string, string, string, ref UserLoginStatus)
Declaration
public static UserInfo ValidateUser(int portalId, string username, string password, string verificationCode, string portalName, string ip, ref UserLoginStatus loginStatus)
Parameters
Returns
ValidateUser(int, string, string, string, string, string, string, ref UserLoginStatus)
Declaration
public static UserInfo ValidateUser(int portalId, string username, string password, string authType, string verificationCode, string portalName, string ip, ref UserLoginStatus loginStatus)
Parameters
Returns
VerifyUser(string)
Declaration
public static void VerifyUser(string verificationCode)
Parameters
Type |
Name |
Description |
string |
verificationCode |
|
Implements
Extension Methods