Add UUID to admin panel, make avatars fetchable by UUID

This commit is contained in:
Evert Prants 2017-11-18 10:59:49 +02:00
parent 11e5ceb0b7
commit b5d1a417de
Signed by: evert
GPG Key ID: 1688DA83D222D0B5
3 changed files with 4 additions and 1 deletions

View File

@ -8,6 +8,7 @@ function cleanUserObject (dbe, admin) {
id: dbe.id,
username: dbe.username,
display_name: dbe.display_name,
uuid: dbe.uuid,
email: dbe.email,
avatar_file: dbe.avatar_file,
activated: dbe.activated === 1,

View File

@ -123,6 +123,8 @@ const API = {
scope = 'username'
if (identifier.indexOf('@') !== -1) {
scope = 'email'
} else if (identifier.length === 36 && identifier.match(/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i)) {
scope = 'uuid'
}
} else if (typeof identifier === 'object') {
if (identifier.id != null) {

View File

@ -30,7 +30,7 @@ block body
{{/activated}}
</div>
<div class="display_name">{{display_name}}</div>
<div class="username">{{id}} - {{username}}</div>
<div class="username">{{id}} - {{username}} ({{uuid}})</div>
<div class="email">{{email}}</div>
<div class="privilege">Privilege: level {{nw_privilege}}</div>
<div class="timestamp">{{created_at}}</div>