{{define "content"}}{{template "settings-start" .}}{{with .Data}}{{$u := .M}}

← Users

{{if $u.Name}}{{$u.Name}}{{else}}{{$u.Email}}{{end}}

{{$u.Email}}{{with $u.Title}} · {{.}}{{end}} · {{template "user-status" $u}}

{{with .Problem}}{{end}}
Access
{{$u.Access}}
Joined
{{if eq $u.Status "invited"}}Not yet{{else}}{{$u.Created.Local.Format "2 Jan 2006"}}{{end}}
Last signed in
{{ago $u.SignedIn}}{{if .SessionsN}} · signed in on {{.SessionsN}} {{if eq .SessionsN 1}}browser{{else}}browsers{{end}}{{end}}
Two-factor sign-in
{{if $u.TwoFactor}}On, {{$u.RecoveryLeft}} recovery codes left{{else}}Off{{end}}
{{if $u.FailedSignIns}}
Failed sign-ins
{{$u.FailedSignIns}} in a row{{if $u.Locked}}, locked {{ago $u.LockedAt}}{{end}}
{{end}}
{{if eq (print $u.Role) "owner"}}

The owner can do everything; their account can only be changed by them, under Settings → Your account.

{{else if .Me}}

This is you: another admin changes your access. Your own settings are under Your account.

{{else}}
{{template "access-fields" (dict "Role" $u.Role "Modules" $u.Modules "Grants" .Grants)}}

Account

{{if eq $u.Status "invited"}}
{{else if eq $u.Status "disabled"}}
{{else}} {{if $u.Locked}}
{{end}} {{if .SessionsN}}
{{end}} {{if $u.TwoFactor}}
{{end}}
{{end}}
{{if $u.TwoFactor}}

Reset two-factor sign-in for someone who lost their phone and their recovery codes: they sign in with their password alone, then turn it on again. Make sure it's really them asking.

{{end}}

Turning an account off signs them out and keeps their name on what they did; they can be turned back on.

{{if ne $u.Status "invited"}}

Remove

Removes the account for good. What they wrote stays.

{{end}} {{end}} {{end}}{{template "settings-end"}}{{end}}