| 1 | {@ include(common/header) @} |
| 2 | {@ include(admin/nav) @} |
| 3 | <h1 class="paragraph">ユーザー:{{ $u['username'] }}</h1> |
| 4 | <table class="admin-table"> |
| 5 | <tbody> |
| 6 | <tr><th>ID</th><td>{{ $u['id'] }}</td></tr> |
| 7 | <tr><th>表示名</th><td>{{ $u['displayname'] }}</td></tr> |
| 8 | <tr><th>メールアドレス</th><td>{{ $u['email'] }}{{ $u['pendingEmail'] !== '' ? '(確認待ち:'.$u['pendingEmail'].')' : '' }}{{ $u['verified'] ? '' : '(未確認)' }}</td></tr> |
| 9 | <tr><th>ロール</th><td>{{ $u['roles'] }}</td></tr> |
| 10 | <tr><th>登録</th><td>{{ $u['reg'] }}</td></tr> |
| 11 | <tr><th>二段階認証</th><td>{{ $u['twoFactor'] ? '有効' : '無効' }}</td></tr> |
| 12 | <tr><th>ログイン</th><td>{{ $u['sessions'] }}件(最後:{{ $u['lastLogin'] }})</td></tr> |
| 13 | </tbody> |
| 14 | </table> |
| 15 | <p class="paragraph"><a href="/profile/{{ $u['username'] }}">プロフィール</a> | <a href="/profile/{{ $u['username'] }}/edit">プロフィールの編集(表示名・アイコン等)</a></p> |
| 16 | |
| 17 | <h2 class="paragraph">ロールとログイン</h2> |
| 18 | <form method="post" action="/admin/users/{{ $u['username'] }}" class="admin-form"> |
| 19 | <input type="hidden" name="csrf_token" value="{{ $csrf }}" /> |
| 20 | <input type="hidden" name="form" value="roles" /> |
| 21 | <div class="admin-checks"> |
| 22 | {@ foreach ($roles as $r) @} |
| 23 | <label><input type="checkbox" name="roles[]" value="{{ $r['bit'] }}"{{{ $r['on'] ? ' checked="checked"' : '' }}} /> {{ $r['label'] }}</label> |
| 24 | {@ endforeach @} |
| 25 | </div> |
| 26 | <small>全部外すとBANになります。</small> |
| 27 | {@ if (!$u['verified'] || $u['pendingEmail'] !== '') @} |
| 28 | <label><input type="checkbox" name="verify" value="1" /> メールアドレスを確認済みにする</label> |
| 29 | {@ endif @} |
| 30 | {@ if ($u['sessions'] > 0) @} |
| 31 | <label><input type="checkbox" name="logoutAll" value="1" /> 全部のログインを取り消す{{ $isSelf ? '(自分もログアウトします)' : '' }}</label> |
| 32 | {@ endif @} |
| 33 | <button>保存</button> |
| 34 | </form> |
| 35 | |
| 36 | <h2 class="paragraph">メールアドレス・パスワード・二段階認証</h2> |
| 37 | <form method="post" action="/admin/users/{{ $u['username'] }}" class="admin-form"> |
| 38 | <input type="hidden" name="csrf_token" value="{{ $csrf }}" /> |
| 39 | <input type="hidden" name="form" value="account" /> |
| 40 | <label>メールアドレス:<input type="email" name="email" value="{{ $u['email'] }}" /></label> |
| 41 | <label>新しいパスワード:<input type="password" name="password" autocomplete="new-password" /></label> |
| 42 | <label>新しいパスワード(確認):<input type="password" name="passwordVerify" autocomplete="new-password" /></label> |
| 43 | <small>パスワードを変えると、全部のログインを取り消します。</small> |
| 44 | {@ if ($u['twoFactor']) @} |
| 45 | <label><input type="checkbox" name="disableTwoFactor" value="1" /> 二段階認証を無効にする(端末を失くした時等)</label> |
| 46 | {@ endif @} |
| 47 | <label>あなた(管理者)のパスワード:<input type="password" name="adminPassword" autocomplete="current-password" required="required" /></label> |
| 48 | <button>変更</button> |
| 49 | </form> |
| 50 | {@ include(common/footer) @} |