Apache Answer Meta
Questions Tags Users Badges

How to get UID in Golang of Answer source code?

Asked Jan 21, 2024 Modified Jan 26, 2024
Viewed 155
support development

How to get UID (User ID) in Golang of Answer source code?

edited Jan 26, 2024
easysys1
asked Jan 21, 2024
1 Answers
import "github.com/apache/incubator-answer/internal/base/middleware"

userID := middleware.GetLoginUserIDFromContext(ctx)
edited Jan 26, 2024
LinkinStar1616
answered Jan 24, 2024
Related Questions
How do I avoid making OAuth users verify their email address?
1 answers
Can i change slug?
1 answers
Showcase of production Answer examples
1 answers
The issues that occurred after building the service using containers
2 answers
The server doesn't serve static files correctly.
Specify a database schema
2 answers

Terms of service Privacy policy

Powered by Answer - the open-source software that powers Q&A communities.
Made with love © 2025 Apache Answer Meta.