메소드 | 설명 | |
---|---|---|
ActivateUser ( string activationKey ) : bool |
Activates the user with given activation key
|
|
AddUser ( string email, string username, string password, bool isAdmin, bool isEditor ) : bool |
Adds a user to the system, and sets the User.IsActivated to true.
|
|
Authenticate ( string email, string password ) : bool |
Authenticates the user with the specified email.
|
|
ChangePassword ( string email, string oldPassword, string newPassword ) : bool |
Changes the password of the user with the given email, authenticating their password first..
|
|
ChangePassword ( string email, string newPassword ) : void |
Changes the password of a user with the given email.
|
|
DeleteUser ( string email ) : bool |
Deletes a user with the given email from the system.
|
|
FormsAuthUserService ( Roadkill.Core.Configuration.ApplicationSettings settings, IRepository repository ) : System | ||
GetLoggedInUser ( string cookieValue ) : |
Gets the currently logged in user, based off the cookie or HttpContext user identity value set during authentication. The value for FormsAuthentication is the user's Guid id.
|
|
GetLoggedInUserName ( System.Web.HttpContextBase context ) : string |
Gets the current username by decrypting the cookie. If FormsAuthentication is disabled or there is no logged in user, this returns an empty string.
|
|
GetUser ( string email, bool isActivated = null ) : |
Retrieves a full User object for the email address provided, or null if the user doesn't exist.
|
|
GetUserById ( System.Guid id, bool isActivated = null ) : |
Retrieves a full User object using the unique ID provided.
|
|
GetUserByResetKey ( string resetKey ) : |
Retrieves a full User object for a password reset request.
|
|
IsAdmin ( string cookieValue ) : bool |
Determines whether the specified user with the given email is an admin.
|
|
IsEditor ( string cookieValue ) : bool |
Determines whether the specified user with the given email is an editor.
|
|
ListAdmins ( ) : IEnumerable |
Lists all admins in the system.
|
|
ListEditors ( ) : IEnumerable |
Lists all editors in the system.
|
|
Logout ( ) : void |
Signs the user out with (typically with FormsAuthentication).
|
|
ResetPassword ( string email ) : string |
Resets the password for the user with the given email.
|
|
Signup ( UserViewModel model, System.Action completed ) : string |
Creates a user in the system without setting the User.IsActivated, in other words for a user confirmation email.
|
|
ToggleAdmin ( string email ) : void |
Adds or remove the user with the email address as an admin.
|
|
ToggleEditor ( string email ) : void |
Adds or remove the user with the email address as an editor.
|
|
UpdateUser ( UserViewModel model ) : bool |
Changes the username of a user to a new username.
|
|
UserExists ( string email ) : bool |
Determines whether the user with the given email exists.
|
|
UserNameExists ( string username ) : bool |
Determines whether the user with the given username exists.
|
public ActivateUser ( string activationKey ) : bool | ||
activationKey | string | The randomly generated activation key for the user. |
리턴 | bool |
public AddUser ( string email, string username, string password, bool isAdmin, bool isEditor ) : bool | ||
string | The email or username. | |
username | string | |
password | string | The password. |
isAdmin | bool | if set to |
isEditor | bool | if set to |
리턴 | bool |
public Authenticate ( string email, string password ) : bool | ||
string | The email address or username of the user. | |
password | string | The password. |
리턴 | bool |
public ChangePassword ( string email, string oldPassword, string newPassword ) : bool | ||
string | The email address or username of the user. | |
oldPassword | string | The old password. |
newPassword | string | The new password to change to. |
리턴 | bool |
public ChangePassword ( string email, string newPassword ) : void | ||
string | The email address of the user. | |
newPassword | string | The new password. |
리턴 | void |
public DeleteUser ( string email ) : bool | ||
string | The email address or username of the user. | |
리턴 | bool |
public FormsAuthUserService ( Roadkill.Core.Configuration.ApplicationSettings settings, IRepository repository ) : System | ||
settings | Roadkill.Core.Configuration.ApplicationSettings | |
repository | IRepository | |
리턴 | System |
public GetLoggedInUser ( string cookieValue ) : |
||
cookieValue | string | The user id stored in the cookie. |
리턴 |
public GetLoggedInUserName ( System.Web.HttpContextBase context ) : string | ||
context | System.Web.HttpContextBase | |
리턴 | string |
public GetUser ( string email, bool isActivated = null ) : |
||
string | The email address of the user to get | |
isActivated | bool | |
리턴 |
public GetUserById ( System.Guid id, bool isActivated = null ) : |
||
id | System.Guid | The ID of the user. |
isActivated | bool | |
리턴 |
public GetUserByResetKey ( string resetKey ) : |
||
resetKey | string | |
리턴 |
public IsAdmin ( string cookieValue ) : bool | ||
cookieValue | string | The user id or username of the user. |
리턴 | bool |
public IsEditor ( string cookieValue ) : bool | ||
cookieValue | string | The user id or username of the user. |
리턴 | bool |
public ResetPassword ( string email ) : string | ||
string | The email address or username of the user. | |
리턴 | string |
public Signup ( UserViewModel model, System.Action completed ) : string | ||
model | UserViewModel | |
completed | System.Action | Called once the signup (e.g. email is sent) is complete. Pass Null for no action. |
리턴 | string |
public ToggleAdmin ( string email ) : void | ||
string | The email address or username of the user. | |
리턴 | void |
public ToggleEditor ( string email ) : void | ||
string | The email address or username of the user. | |
리턴 | void |
public UpdateUser ( UserViewModel model ) : bool | ||
model | UserViewModel | The user details to change. The password property is ignored for this object - use ChangePassword instead. |
리턴 | bool |
public UserExists ( string email ) : bool | ||
string | The email address or username of the user. | |
리턴 | bool |