mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-07 21:51:13 -07:00
Finished the notes! Resolved #7
This commit is contained in:
parent
98c0a4f879
commit
a2f44cf8d2
10 changed files with 40 additions and 28 deletions
|
@ -86,12 +86,14 @@ namespace PlexRequests.UI.Modules
|
|||
|
||||
Post["/register"] = x =>
|
||||
{
|
||||
var username = (string) Request.Form.Username;
|
||||
var exists = UserMapper.DoUsersExist();
|
||||
if (exists)
|
||||
{
|
||||
return Context.GetRedirect("~/register?error=true&username=" + (string)Request.Form.Username);
|
||||
return Context.GetRedirect("~/register?error=true&username=" + username);
|
||||
}
|
||||
var userId = UserMapper.CreateUser(Request.Form.Username, Request.Form.Password);
|
||||
var userId = UserMapper.CreateUser(username, Request.Form.Password);
|
||||
Session[SessionKeys.UsernameKey] = username;
|
||||
return this.LoginAndRedirect((Guid)userId);
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue