Skip to content

Commit b3fe17a

Browse files
committed
Fix missing username detection in IsOnline
1 parent 9d85e38 commit b3fe17a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

libauth/requests.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,12 @@ func IsOnline(host *UrlProvider, acID string) (online bool, err error, username
157157
if valid && res == "ok" {
158158
online = true
159159
logger.Debugf("User is online\n")
160-
return
160+
}
161+
162+
res, valid = infoResp["user_name"].(string)
163+
if valid {
164+
username = res
165+
logger.Debugf("User name is \"%s\"\n", username)
161166
}
162167

163168
return

0 commit comments

Comments
 (0)