Browse Source

Fixed not logging in after registration.

Fixed not saving login_name when creating git user.
tags/2.0.3
Teknikode 4 years ago
parent
commit
ffbdec715c
2 changed files with 4 additions and 1 deletions
  1. 1
    1
      Teknik/Areas/Profile/Controllers/ProfileController.cs
  2. 3
    0
      Teknik/Scripts/Common.js

+ 1
- 1
Teknik/Areas/Profile/Controllers/ProfileController.cs View File

@@ -234,7 +234,7 @@ namespace Teknik.Areas.Profile.Controllers
// Add gogs user
using (var client = new WebClient())
{
var obj = new { source_id = Config.GitConfig.SourceId, username = model.Username, email = email, password = model.Password };
var obj = new { source_id = Config.GitConfig.SourceId, username = model.Username, email = email, login_name = email, password = model.Password };
string json = Newtonsoft.Json.JsonConvert.SerializeObject(obj);
client.Headers[HttpRequestHeader.ContentType] = "application/json";
Uri baseUri = new Uri(Config.GitConfig.Host);

+ 3
- 0
Teknik/Scripts/Common.js View File

@@ -39,6 +39,9 @@
type: "POST",
url: form.attr('action'),
data: form.serialize(),
xhrFields: {
withCredentials: true
},
success: function (html) {
if (html.result) {
window.location.reload();

Loading…
Cancel
Save