Skip to content
Corex

AccountService

Corex\Profile\Account\AccountService · class · Add-ons layer

Front-office account orchestration. Owns validation and policy (registration gate, email/password rules, generic reset responses that resist user enumeration) and delegates every WordPress-touching step to an injected {@see AuthGateway}. Thin controllers/REST call this; the theme only presents its results (Principles I/III).

register(RegistrationRequest $request): AccountResult

Section titled “register(RegistrationRequest $request): AccountResult”

login(string $login, string $password, bool $remember): AccountResult

Section titled “login(string $login, string $password, bool $remember): AccountResult”

requestPasswordReset(string $login): AccountResult

Section titled “requestPasswordReset(string $login): AccountResult”

Always reports the same generic outcome whether or not the account exists, so a caller cannot enumerate registered users through this endpoint.

resetPassword(string $key, string $login, string $password, string $passwordConfirm): AccountResult

Section titled “resetPassword(string $key, string $login, string $password, string $passwordConfirm): AccountResult”

updateProfile(int $userId, array $fields): AccountResult

Section titled “updateProfile(int $userId, array $fields): AccountResult”