Browse Source

Fixed not logging in after registration.

Fixed not saving login_name when creating git user.
master
Teknikode 6 years ago
parent
commit
ffbdec715c
  1. 2
      Teknik/Areas/Profile/Controllers/ProfileController.cs
  2. 3
      Teknik/Scripts/Common.js

2
Teknik/Areas/Profile/Controllers/ProfileController.cs

@ -234,7 +234,7 @@ namespace Teknik.Areas.Profile.Controllers @@ -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
Teknik/Scripts/Common.js

@ -39,6 +39,9 @@ @@ -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