Skip to content

feat(libSceNpManager): implement sceNpGetUserIdByAccountId - #1536

Closed
AcelezXYZ wants to merge 1 commit into
boykopovar:mainfrom
AcelezXYZ:feat/np-get-user-id-by-account-id
Closed

AcelezXYZ wants to merge 1 commit into
boykopovar:mainfrom
AcelezXYZ:feat/np-get-user-id-by-account-id

Conversation

@AcelezXYZ

@AcelezXYZ AcelezXYZ commented Oct 8, 2026 •

Copy link
Copy Markdown

What

Implements sceNpGetUserIdByAccountId(accountId, userId*) in libSceNpManager (PPSA14632 imports it).

  • Account id 0 or a null userId returns SCE_NP_ERROR_INVALID_ARGUMENT (0x80550003).
  • Every other call returns SCE_NP_ERROR_SIGNED_OUT (0x80550006) and leaves *userId untouched, as PSN is not emulated and no account is ever signed in (same model as sceNpGetAccountIdA and sceNpGetNpId).

Signature and argument errors follow the shadPS4 reimplementation of the PS4 library (pinned commit linked in TechnicalDebt; with its network service disabled it returns SIGNED_OUT the same way), not confirmed on a PS5 title.

Tested

  • Linux x86-64, GCC 13.3, Release build, full ctest: 441/442 pass. The only failure is guest_sce_net (no IPv6 in my sandbox, also fails on unmodified main); this PR does not touch libSceNet.
  • GuestNpManager extended: signed-out result with the user id untouched, account id 0 rejected, null user id rejected. A deliberately broken build (account id 0 accepted) makes the test fail.
  • tools/check_conventions.py --base origin/main passes.
  • Not tested with a title or homebrew.

Checklist

  • Based on current main (084aeeb); no other open PR implements the same functions (all PR heads up to fix(libkernel): preserve Windows file timestamp precision #1518 checked)
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt
  • No notes, investigation .md files or images added to the repository
  • New third-party code is a submodule built from source (none added)
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes (Claude Code); the author is responsible for every line

@github-actions

github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
#1545 docs/dev/TechnicalDebt.md L95

@oneandonlydean

Copy link
Copy Markdown
Collaborator

Closing: PPSA14632 imports sceNpGetUserIdByAccountId, but no title is shown stopping at it on main. Reopen when it's a title's next stop there, with the log line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants