save userId in db, and get username

save userId in db, and get username