As long as you’re trying posts up to a user id and not a username that should be fine? The username should only ever be referenced in the user table, with the id tying that username to posts in all other area.
Unless I’m misunderstanding what you’re asking then ignore my retardation and spergery.