mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-03 04:10:20 +08:00
fix: Missing extendedUser in signup webhook (#522)
Signed-off-by: Steve0x2a <stevesough@gmail.com>
This commit is contained in:
@ -147,7 +147,7 @@ func (c *ApiController) Signup() {
|
||||
username = id
|
||||
}
|
||||
|
||||
userCount := object.GetUserCount(form.Organization, "", "") + 1
|
||||
userCount := object.GetUserCount(form.Organization, "", "") + 1
|
||||
|
||||
user := &object.User{
|
||||
Owner: form.Organization,
|
||||
@ -199,6 +199,11 @@ func (c *ApiController) Signup() {
|
||||
object.DisableVerificationCode(form.Email)
|
||||
object.DisableVerificationCode(checkPhone)
|
||||
|
||||
record := object.NewRecord(c.Ctx)
|
||||
record.Organization = application.Organization
|
||||
record.User = user.Name
|
||||
go object.AddRecord(record)
|
||||
|
||||
util.LogInfo(c.Ctx, "API: [%s] is signed up as new user", userId)
|
||||
|
||||
c.ResponseOk(userId)
|
||||
|
@ -54,7 +54,7 @@ func getUserByClientIdSecret(ctx *context.Context) string {
|
||||
}
|
||||
|
||||
func RecordMessage(ctx *context.Context) {
|
||||
if ctx.Request.URL.Path == "/api/login" {
|
||||
if ctx.Request.URL.Path == "/api/login" || ctx.Request.URL.Path == "/api/signup" {
|
||||
return
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user