[us_account], or the Account block: the name and email of whoever is signed in, and a Sign out link. Nothing else.
Two decisions worth your eye
Signed out with no login page chosen, the block renders nothing. Its whole subject is the person signed in, which a stranger is not, and a bare "you are not signed in" in a site header is noise with no way to act on it. With a login page chosen it offers a Sign in link instead. The editor preview stays populated regardless, so the block is never an invisible box to whoever is placing it.
Signing out returns to the chosen login page, or the current page when there is none. A block meant for a header shouldn't also navigate someone somewhere when they use it. The login page wins when configured, since the page they were on may well be members-only.
The name comes from Auth\UserName::format(), so the block never exposes a username the way display_name can.
Also included
docs/features/editor-blocks.md was stale: it described "the plugin's four front-end shortcodes" and had never listed the family block. Both fixed while adding the account rows.
Verification
composer test (789, up from 782), composer lint, composer cs all pass. AccountPageTest covers each visitor state, both sign-out redirect targets, the shortcode attribute spelling, and a login page that has since been deleted (get_permalink() returning false). The two registrar tests that assert the full block and shortcode lists were updated.
Rendered both signed-in and signed-out states in a browser against the real stylesheet to check it sits sensibly at sidebar width.
Closes #142.
`[us_account]`, or the **Account** block: the name and email of whoever is signed in, and a **Sign out** link. Nothing else.
## Two decisions worth your eye
**Signed out with no login page chosen, the block renders nothing.** Its whole subject is the person signed in, which a stranger is not, and a bare "you are not signed in" in a site header is noise with no way to act on it. With a login page chosen it offers a **Sign in** link instead. The editor preview stays populated regardless, so the block is never an invisible box to whoever is placing it.
**Signing out returns to the chosen login page, or the current page when there is none.** A block meant for a header shouldn't also navigate someone somewhere when they use it. The login page wins when configured, since the page they were on may well be members-only.
The name comes from `Auth\UserName::format()`, so the block never exposes a username the way `display_name` can.
## Also included
`docs/features/editor-blocks.md` was stale: it described "the plugin's four front-end shortcodes" and had never listed the family block. Both fixed while adding the account rows.
## Verification
`composer test` (789, up from 782), `composer lint`, `composer cs` all pass. `AccountPageTest` covers each visitor state, both sign-out redirect targets, the shortcode attribute spelling, and a login page that has since been deleted (`get_permalink()` returning false). The two registrar tests that assert the full block and shortcode lists were updated.
Rendered both signed-in and signed-out states in a browser against the real stylesheet to check it sits sensibly at sidebar width.
[us_account], or the Account block: the signed-in visitor's name, their
email, a Sign out link, and — only when the account books for someone
besides itself — the students it books for. A parent's first question on
seeing "signed in as Grace" is whether this is the account their children's
lessons are on.
Two decisions worth naming.
Signed out with no login page chosen, the block renders nothing. Its whole
subject is the person signed in, which a stranger is not, and a bare "you
are not signed in" in a site header is noise with no way to act on it. With
a login page chosen it offers a Sign in link instead. The editor preview is
populated regardless, so the block is never an invisible box to the person
placing it.
Signing out returns to the chosen login page, or to the current page when
there is none. A block meant for a header should not also navigate someone
somewhere when they use it; the login page wins when configured, because the
page they were on may well be members-only.
The name comes from UserName::format(), so the block never exposes a
username the way display_name can.
Also brings docs/features/editor-blocks.md back in step: it still described
"four shortcodes" and had never listed the family block.
Closes#142
Co-Authored-By: Claude Opus 5 <[email protected]>
The block reports who is signed in and nothing more. Dropping the "Booking
for …" line takes GuardianService with it — it was the only reason the page
had a dependency at all, so AccountPage now constructs with no arguments.
Co-Authored-By: Claude Opus 5 <[email protected]>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Closes #142.
[us_account], or the Account block: the name and email of whoever is signed in, and a Sign out link. Nothing else.Two decisions worth your eye
Signed out with no login page chosen, the block renders nothing. Its whole subject is the person signed in, which a stranger is not, and a bare "you are not signed in" in a site header is noise with no way to act on it. With a login page chosen it offers a Sign in link instead. The editor preview stays populated regardless, so the block is never an invisible box to whoever is placing it.
Signing out returns to the chosen login page, or the current page when there is none. A block meant for a header shouldn't also navigate someone somewhere when they use it. The login page wins when configured, since the page they were on may well be members-only.
The name comes from
Auth\UserName::format(), so the block never exposes a username the waydisplay_namecan.Also included
docs/features/editor-blocks.mdwas stale: it described "the plugin's four front-end shortcodes" and had never listed the family block. Both fixed while adding the account rows.Verification
composer test(789, up from 782),composer lint,composer csall pass.AccountPageTestcovers each visitor state, both sign-out redirect targets, the shortcode attribute spelling, and a login page that has since been deleted (get_permalink()returning false). The two registrar tests that assert the full block and shortcode lists were updated.Rendered both signed-in and signed-out states in a browser against the real stylesheet to check it sits sensibly at sidebar width.
4c92d19d2etoca5fac5c06ca5fac5c06toab5212282d