diff --git a/server/api/admin.js b/server/api/admin.js index 7f56c1c..cbc9b98 100644 --- a/server/api/admin.js +++ b/server/api/admin.js @@ -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, diff --git a/server/api/index.js b/server/api/index.js index 8ee6276..028531d 100644 --- a/server/api/index.js +++ b/server/api/index.js @@ -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) { diff --git a/views/admin/index.pug b/views/admin/index.pug index 885ff86..2b40f12 100644 --- a/views/admin/index.pug +++ b/views/admin/index.pug @@ -30,7 +30,7 @@ block body {{/activated}}
{{display_name}}
-
{{id}} - {{username}}
+
{{id}} - {{username}} ({{uuid}})
{{email}}
Privilege: level {{nw_privilege}}
{{created_at}}