Disadus Documentation
  • Disadus Documentation
  • 🔓Authentication
    • Basic Authentication (REST)
    • Socket Authentication (WS)
  • 🔆Disadus Core
    • About Disadus Core
    • Page 2
    • 🫂Community Data
      • 📅Community Schedules
      • ⚙️Community LMS Settings
      • Community-Related Types
      • Get Community Info (REST)
      • Search For Communities (REST)
      • Get Communities Join Info (REST)
      • Join A Community (REST)
      • Leave A Community (REST)
    • 🧑User Data
      • User-Related Types
      • Get Self User Info (REST)
      • Get Self User Info (WS)
      • Get User Info by ID (REST)
      • Get User Info By ID (WS)
      • Get User Info By Username (WS)
  • 📖Disadus Courses
    • About Disadus Courses
    • 📣Course Announcements
    • 📝Course Assignments
    • ⚙️Course Preferences
    • 💯Course Grades
Powered by GitBook
On this page
  • Request
  • Response

Was this helpful?

  1. Disadus Core
  2. User Data

Get User Info By Username (WS)

Request

Event Name:

user.username

Event Args

userID:string

Response

Response Event Name:

getUserByUsername

Response Event Data:

{
      user: ,
      username: string
}

Sample Code

socket.emit("user.username","teto"); // get user with id TET00

socket.on("getUserByUsername",(data)=>{
    const { user, username } = data;
    console.log(user as );
    console.log(username as string)
)
PreviousGet User Info By ID (WS)NextAbout Disadus Courses

Last updated 2 years ago

Was this helpful?

🔆
🧑