summaryrefslogtreecommitdiffstats
path: root/routers/user/user.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/user/user.go')
-rw-r--r--routers/user/user.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/routers/user/user.go b/routers/user/user.go
index 8144730e09..a50f126c0c 100644
--- a/routers/user/user.go
+++ b/routers/user/user.go
@@ -226,7 +226,7 @@ func SignUpPost(ctx *middleware.Context, form auth.RegisterForm) {
}
var err error
- if u, err = models.RegisterUser(u); err != nil {
+ if u, err = models.CreateUser(u); err != nil {
switch err {
case models.ErrUserAlreadyExist:
ctx.Data["Err_UserName"] = true
@@ -235,13 +235,14 @@ func SignUpPost(ctx *middleware.Context, form auth.RegisterForm) {
ctx.Data["Err_Email"] = true
ctx.RenderWithErr("E-mail address has been already used", SIGNUP, &form)
case models.ErrUserNameIllegal:
+ ctx.Data["Err_UserName"] = true
ctx.RenderWithErr(models.ErrRepoNameIllegal.Error(), SIGNUP, &form)
default:
- ctx.Handle(500, "user.SignUpPost(RegisterUser)", err)
+ ctx.Handle(500, "user.SignUpPost(CreateUser)", err)
}
return
}
- log.Trace("%s User created: %s", ctx.Req.RequestURI, form.UserName)
+ log.Trace("%s User created: %s", ctx.Req.RequestURI, u.Name)
// Bind social account.
if isOauth {