Browse Source

New users will not get disabled anymore

We login every newly created user, so the last login date is set to the
creation date and it will not get locked for inactivity.

This doesn't solve the problem of the admin edition of the locked
status. When an admin changes the locked status of an account as it
doesn't reset the last login date the account will get locked again
automatically.

* Related: #6
webdeploy
meskio 2 years ago
parent
commit
9ebcb4cb5b
Signed by: meskio
GPG Key ID: 52B8F5AC97A2DA86
  1. 8
      server/add_user.go

8
server/add_user.go

@ -208,6 +208,14 @@ func (s *server) addUserHandler(w http.ResponseWriter, r *http.Request) {
return
}
// do login with the user so the LastLogin gets set
_, err = s.ldap.ValidateUser(name, pass)
if err != nil {
log.Println("Error validating added user: ", err)
s.errorHandler(w, r)
return
}
host, err := s.db.InviteHost(invite)
if err != nil {
log.Println("Error getting invite host: ", err)

Loading…
Cancel
Save