AccountFlows final class
Minn\Runtime\AccountFlows · public/minn/src/Minn/Runtime/AccountFlows.php · 140 lines
The account functions a sign-in page and plugins call, with the reference's checks, words, hooks and mail (probe account-flows): asking for a password reset (retrieve_password), resetting one (reset_password), registering (register_new_user), and telling the site and the new user about a registration (wp_new_user_notification).
Constants and properties
| private | NO_ACCOUNT = '<strong>Error:</strong> There is no account with that username or email address.' |
Public
| static | retrievePassword(string $login): WP_Error|bool# | A reset link mailed to the account a login or email names: true, or the refusal (no name, no such account, a plugin's error, reset not allowed, or the mail failing). |
| static | resetPassword(WP_User $user, string $password): void# | A new password for a user, announced before (password_reset) and after (after_password_reset). |
| static | registerNewUser(string $login, string $email): WP_Error|int# | A new account for a login and an email, with a generated password and the nag to change it: its id, or every refusal at once (the name empty, illegal, taken or barred; the email empty, malformed or taken; whatever register_post and registration_errors add). |
| static | newUserNotification(int $userId, mixed $deprecated, string $notify): void# | A new account announced: to the site's address (unless only the user is told), then to the user with a link to set their password (unless only the site is, or the old call shape asks for nobody). |
Internals 1
Private and protected methods: how the class does its work. Not a contract; they change whenever the code is tidied.
| private | resetLink(WP_User $user, string $key): string# | The link that opens the password form for a user's key. |
Nothing matches.