C# 클래스 ScrewTurn.Wiki.Users

Manages all the User Accounts data.
파일 보기 프로젝트 열기: mono/ScrewTurnWiki

공개 메소드들

메소드 설명
AddUser ( string username, string displayName, string password, string email, bool active, IUsersStorageProviderV30 provider ) : bool

Adds a new User.

AddUserGroup ( string name, string description ) : bool

Adds a new user group to the default provider.

AddUserGroup ( string name, string description, IUsersStorageProviderV30 provider ) : bool

Adds a new user group to a specific provider.

ChangeEmail ( UserInfo user, string newEmail ) : bool

Changes the Email address of a User.

ChangePassword ( UserInfo user, string newPassword ) : bool

Changes the Password of a User.

ComputeLoginKey ( string username, string email, System.DateTime dateTime ) : string

Copmputes the login key.

FindUser ( string username ) : UserInfo

Finds a user.

FindUserByEmail ( string email ) : UserInfo

Finds a user by email.

FindUserGroup ( string name ) : UserGroup

Finds a user group.

GetAdministratorAccount ( ) : UserInfo

Gets the built-in administrator account.

GetAnonymousAccount ( ) : UserInfo

Gets the fake anonymous account.

GetDisplayName ( UserInfo user ) : string

Gets the display name of a user.

GetEmailNotification ( UserInfo user, NamespaceInfo nspace, bool &pageChanges, bool &discussionMessages ) : void

Gets the email notification status for a namespace.

GetEmailNotification ( UserInfo user, System.PageInfo page, bool &pageChanges, bool &discussionMessages ) : void

Gets the email notification status for a page.

GetUserData ( UserInfo user, string key ) : string

Gets user data.

GetUserGroups ( ) : List

Gets all the user groups.

GetUserGroups ( IUsersStorageProviderV30 provider ) : List

Gets all the user groups in a provider.

GetUserGroupsForUser ( UserInfo user ) : List

Gets all the user groups a user is member of.

GetUsers ( ) : List

Gets all the Users that the providers declare to manage.

GetUsersToNotifyForDiscussionMessages ( System.PageInfo page ) : UserInfo[]

Gets all the users that must be notified of a discussion message.

GetUsersToNotifyForPageChange ( System.PageInfo page ) : UserInfo[]

Gets all the users that must be notified of a page change.

ModifyUser ( UserInfo user, string displayName, string password, string email, bool active ) : bool

Updates a new User.

ModifyUserGroup ( UserGroup group, string description ) : bool

Modifies a user group.

NotifyLogout ( string username ) : void

Notifies to the proper provider that a user has logged out.

RemoveUser ( UserInfo user ) : bool

Removes a User.

RemoveUserGroup ( UserGroup group ) : bool

Removes a user group.

SendPasswordResetMessage ( string username, string email, System.DateTime dateTime ) : void

Sends the password reset message to a user.

SetActivationStatus ( UserInfo user, bool active ) : bool

Sets the Active/Inactive status of a User.

SetEmailNotification ( UserInfo user, NamespaceInfo nspace, bool pageChanges, bool discussionMessages ) : bool

Sets the email notification status for a namespace.

SetEmailNotification ( UserInfo user, System.PageInfo page, bool pageChanges, bool discussionMessages ) : bool

Sets the email notification status for a page.

SetUserData ( UserInfo user, string key, string data ) : bool

Sets user data.

SetUserMembership ( UserInfo user, string groups ) : bool

Sets the group memberships of a user account.

TryAutoLogin ( HttpContext context ) : UserInfo

Tries to automatically login a user using the current HttpContext, through any provider that supports the operation.

TryCookieLogin ( string username, string loginKey ) : UserInfo

Tries to login a user through the cookie-stored authentication data.

TryLogin ( string username, string password ) : UserInfo

Tries to manually login a user using all the available methods.

UserLink ( string username ) : string

Creates the correct link of a User.

UserLink ( string username, bool newWindow ) : string

Creates the correct link of a User.

비공개 메소드들

메소드 설명
GetUsersToNotify ( NamespaceInfo nspace, string key ) : UserInfo[]

Gets the users to notify for either a page change or a discussion message in a namespace.

GetUsersToNotify ( System.PageInfo page, string key ) : UserInfo[]

Gets the users to notify for either a page change or a discussion message.

ListDirectories ( IFilesStorageProviderV30 provider ) : List

Lists all directories in a provider, including the root.

ListDirectoriesRecursive ( IFilesStorageProviderV30 provider, string current, List output ) : void
MergeArrays ( UserInfo array1, UserInfo array2 ) : UserInfo[]

Merges two arrays of users, removing duplicates.

RemovePermissions ( UserGroup group ) : void

Removes all permissions for a group.

RemovePermissions ( UserInfo user ) : void

Removes all permissions for a user.

메소드 상세

AddUser() 공개 정적인 메소드

Adds a new User.
public static AddUser ( string username, string displayName, string password, string email, bool active, IUsersStorageProviderV30 provider ) : bool
username string The Username.
displayName string The display name.
password string The Password (plain text).
email string The Email address.
active bool A value specifying whether or not the account is active.
provider IUsersStorageProviderV30 The Provider. If null, the default provider is used.
리턴 bool

AddUserGroup() 공개 정적인 메소드

Adds a new user group to the default provider.
public static AddUserGroup ( string name, string description ) : bool
name string The name of the group.
description string The description of the group.
리턴 bool

AddUserGroup() 공개 정적인 메소드

Adds a new user group to a specific provider.
public static AddUserGroup ( string name, string description, IUsersStorageProviderV30 provider ) : bool
name string The name of the group.
description string The description of the group.
provider IUsersStorageProviderV30 The target provider.
리턴 bool

ChangeEmail() 공개 정적인 메소드

Changes the Email address of a User.
public static ChangeEmail ( UserInfo user, string newEmail ) : bool
user UserInfo The User to change the Email address of.
newEmail string The new Email address.
리턴 bool

ChangePassword() 공개 정적인 메소드

Changes the Password of a User.
public static ChangePassword ( UserInfo user, string newPassword ) : bool
user UserInfo The User to change the password of.
newPassword string The new Password (plain text).
리턴 bool

ComputeLoginKey() 공개 정적인 메소드

Copmputes the login key.
public static ComputeLoginKey ( string username, string email, System.DateTime dateTime ) : string
username string The username.
email string The email.
dateTime System.DateTime The registration date/time.
리턴 string

FindUser() 공개 정적인 메소드

Finds a user.
public static FindUser ( string username ) : UserInfo
username string The username.
리턴 UserInfo

FindUserByEmail() 공개 정적인 메소드

Finds a user by email.
public static FindUserByEmail ( string email ) : UserInfo
email string The email address.
리턴 UserInfo

FindUserGroup() 공개 정적인 메소드

Finds a user group.
public static FindUserGroup ( string name ) : UserGroup
name string The name of the user group to find.
리턴 UserGroup

GetAdministratorAccount() 공개 정적인 메소드

Gets the built-in administrator account.
public static GetAdministratorAccount ( ) : UserInfo
리턴 UserInfo

GetAnonymousAccount() 공개 정적인 메소드

Gets the fake anonymous account.
public static GetAnonymousAccount ( ) : UserInfo
리턴 UserInfo

GetDisplayName() 공개 정적인 메소드

Gets the display name of a user.
public static GetDisplayName ( UserInfo user ) : string
user UserInfo The user.
리턴 string

GetEmailNotification() 공개 정적인 메소드

Gets the email notification status for a namespace.
public static GetEmailNotification ( UserInfo user, NamespaceInfo nspace, bool &pageChanges, bool &discussionMessages ) : void
user UserInfo The user for which to get the notification status.
nspace NamespaceInfo The namespace subject of the notification (null for the root).
pageChanges bool A value indicating whether page changes should be notified.
discussionMessages bool A value indicating whether discussion messages should be notified.
리턴 void

GetEmailNotification() 공개 정적인 메소드

Gets the email notification status for a page.
public static GetEmailNotification ( UserInfo user, System.PageInfo page, bool &pageChanges, bool &discussionMessages ) : void
user UserInfo The user for which to get the notification status.
page System.PageInfo The page subject of the notification.
pageChanges bool A value indicating whether page changes should be notified.
discussionMessages bool A value indicating whether discussion messages should be notified.
리턴 void

GetUserData() 공개 정적인 메소드

Gets user data.
public static GetUserData ( UserInfo user, string key ) : string
user UserInfo The user.
key string The data key.
리턴 string

GetUserGroups() 공개 정적인 메소드

Gets all the user groups.
public static GetUserGroups ( ) : List
리턴 List

GetUserGroups() 공개 정적인 메소드

Gets all the user groups in a provider.
public static GetUserGroups ( IUsersStorageProviderV30 provider ) : List
provider IUsersStorageProviderV30 The provider.
리턴 List

GetUserGroupsForUser() 공개 정적인 메소드

Gets all the user groups a user is member of.
public static GetUserGroupsForUser ( UserInfo user ) : List
user UserInfo The user.
리턴 List

GetUsers() 공개 정적인 메소드

Gets all the Users that the providers declare to manage.
public static GetUsers ( ) : List
리턴 List

GetUsersToNotifyForDiscussionMessages() 공개 정적인 메소드

Gets all the users that must be notified of a discussion message.
public static GetUsersToNotifyForDiscussionMessages ( System.PageInfo page ) : UserInfo[]
page System.PageInfo The page.
리턴 UserInfo[]

GetUsersToNotifyForPageChange() 공개 정적인 메소드

Gets all the users that must be notified of a page change.
public static GetUsersToNotifyForPageChange ( System.PageInfo page ) : UserInfo[]
page System.PageInfo The page.
리턴 UserInfo[]

ModifyUser() 공개 정적인 메소드

Updates a new User.
public static ModifyUser ( UserInfo user, string displayName, string password, string email, bool active ) : bool
user UserInfo The user to modify.
displayName string The display name.
password string The Password (plain text, null or empty for no change).
email string The Email address.
active bool A value specifying whether or not the account is active.
리턴 bool

ModifyUserGroup() 공개 정적인 메소드

Modifies a user group.
public static ModifyUserGroup ( UserGroup group, string description ) : bool
group UserGroup The user group to modify.
description string The new description.
리턴 bool

NotifyLogout() 공개 정적인 메소드

Notifies to the proper provider that a user has logged out.
public static NotifyLogout ( string username ) : void
username string The username.
리턴 void

RemoveUser() 공개 정적인 메소드

Removes a User.
public static RemoveUser ( UserInfo user ) : bool
user UserInfo The User to remove.
리턴 bool

RemoveUserGroup() 공개 정적인 메소드

Removes a user group.
public static RemoveUserGroup ( UserGroup group ) : bool
group UserGroup The user group to remove.
리턴 bool

SendPasswordResetMessage() 공개 정적인 메소드

Sends the password reset message to a user.
public static SendPasswordResetMessage ( string username, string email, System.DateTime dateTime ) : void
username string The username.
email string The email.
dateTime System.DateTime The user registration date/time.
리턴 void

SetActivationStatus() 공개 정적인 메소드

Sets the Active/Inactive status of a User.
public static SetActivationStatus ( UserInfo user, bool active ) : bool
user UserInfo The User.
active bool The status.
리턴 bool

SetEmailNotification() 공개 정적인 메소드

Sets the email notification status for a namespace.
public static SetEmailNotification ( UserInfo user, NamespaceInfo nspace, bool pageChanges, bool discussionMessages ) : bool
user UserInfo The user for which to set the notification status.
nspace NamespaceInfo The namespace subject of the notification.
pageChanges bool A value indicating whether page changes should be notified.
discussionMessages bool A value indicating whether discussion messages should be notified.
리턴 bool

SetEmailNotification() 공개 정적인 메소드

Sets the email notification status for a page.
public static SetEmailNotification ( UserInfo user, System.PageInfo page, bool pageChanges, bool discussionMessages ) : bool
user UserInfo The user for which to set the notification status.
page System.PageInfo The page subject of the notification.
pageChanges bool A value indicating whether page changes should be notified.
discussionMessages bool A value indicating whether discussion messages should be notified.
리턴 bool

SetUserData() 공개 정적인 메소드

Sets user data.
public static SetUserData ( UserInfo user, string key, string data ) : bool
user UserInfo The user.
key string The data key.
data string The data value.
리턴 bool

SetUserMembership() 공개 정적인 메소드

Sets the group memberships of a user account.
public static SetUserMembership ( UserInfo user, string groups ) : bool
user UserInfo The user account.
groups string The groups the user account is member of.
리턴 bool

TryAutoLogin() 공개 정적인 메소드

Tries to automatically login a user using the current HttpContext, through any provider that supports the operation.
public static TryAutoLogin ( HttpContext context ) : UserInfo
context System.Web.HttpContext The current HttpContext.
리턴 UserInfo

TryCookieLogin() 공개 정적인 메소드

Tries to login a user through the cookie-stored authentication data.
public static TryCookieLogin ( string username, string loginKey ) : UserInfo
username string The username.
loginKey string The login key.
리턴 UserInfo

TryLogin() 공개 정적인 메소드

Tries to manually login a user using all the available methods.
public static TryLogin ( string username, string password ) : UserInfo
username string The username.
password string The password.
리턴 UserInfo

UserLink() 공개 정적인 메소드

Creates the correct link of a User.
public static UserLink ( string username ) : string
username string The Username.
리턴 string

UserLink() 공개 정적인 메소드

Creates the correct link of a User.
public static UserLink ( string username, bool newWindow ) : string
username string The Username.
newWindow bool A value indicating whether to open the link in a new window.
리턴 string