Re-fix signup without email (@Leodmanx2 broke it)
Cette révision appartient à :
Parent
e94a015b28
révision
18b8082adf
3 fichiers modifiés avec 6 ajouts et 3 suppressions
|
@ -116,6 +116,9 @@ func SetCookieHandler(w http.ResponseWriter, email string, pass string) (int, er
|
|||
// RegisterHanderFromForm sets cookie from a RegistrationForm.
|
||||
func RegisterHanderFromForm(w http.ResponseWriter, registrationForm formStruct.RegistrationForm) (int, error) {
|
||||
email := registrationForm.Email
|
||||
if email == "" {
|
||||
email = registrationForm.Username
|
||||
}
|
||||
pass := registrationForm.Password
|
||||
log.Debugf("RegisterHandler UserEmail : %s", email)
|
||||
log.Debugf("RegisterHandler UserPassword : %s", pass)
|
||||
|
|
|
@ -49,7 +49,7 @@ func IsAgreed(termsAndConditions string) bool { // TODO: Inline function
|
|||
// RegistrationForm is used when creating a user.
|
||||
type RegistrationForm struct {
|
||||
Username string `form:"username" needed:"true" len_min:"3" len_max:"20"`
|
||||
Email string `form:"email" needed:"true"`
|
||||
Email string `form:"email"`
|
||||
Password string `form:"password" needed:"true" len_min:"6" len_max:"25" equalInput:"ConfirmPassword"`
|
||||
ConfirmPassword string `form:"password_confirmation" omit:"true" needed:"true"`
|
||||
CaptchaID string `form:"captchaID" omit:"true" needed:"true"`
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
},
|
||||
{
|
||||
"id":"signup_box_title",
|
||||
"translation": "Registrier dich <small>Es ist kostenlos und wird immer so bleiben.</small>"
|
||||
"translation": "Registriere dich <small>Es ist kostenlos und wird immer so bleiben.</small>"
|
||||
},
|
||||
{
|
||||
"id":"username",
|
||||
|
@ -81,7 +81,7 @@
|
|||
},
|
||||
{
|
||||
"id":"sign_in_box_title",
|
||||
"translation": "Bitte logge dich zuerst ein"
|
||||
"translation": "Bitte logge dich ein"
|
||||
},
|
||||
{
|
||||
"id":"sign_in_title",
|
||||
|
|
Référencer dans un nouveau ticket