M #-: Fix GOCA bug (#3776)

This commit is contained in:
Christian González authored and Ruben S. Montero committed 2019-09-26 12:07:22 +02:00
1 parent 5951d4232d
commit ab0dc8cfd1
1 file changed
+6 -1
+6 -1
View File
@@ -131,7 +131,12 @@ func (uc *UserController) Passwd(password string) error {
// * timeSeconds: Valid period in seconds; 0 reset the token and -1 for a non-expiring token.
// * effectiveGID: Effective GID to use with this token. To use the current GID and user groups set it to -1
func (uc *UserController) Login(token string, timeSeconds int, effectiveGID int) error {
_, err := uc.c.Client.Call("one.user.login", uc.Name, token, timeSeconds, effectiveGID)
user, err := uc.Info()
if err != nil {
return err
}
_, err = uc.c.Client.Call("one.user.login", user.Name, token, timeSeconds, effectiveGID)
return err
}