mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 14:34:23 +01:00
User: Add name and image URL (#6008)
* User: Add name and image URL More personalization options, prerequisite for btcpayserver/app#3. Additionally: - Remove ambigious and read-only username from manage view. - Improve email verification conditions and display. - Greenfield: Update current user. Prerequisite for btcpayserver/app#13. * Refactor UpdateCurrentUser * Replace new columns by UserBlob * Update email check and add test case for mailbox addresses --------- Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
This commit is contained in:
@@ -49,6 +49,7 @@ namespace BTCPayServer.Services
|
||||
|
||||
public static ApplicationUserData FromModel(ApplicationUser data, string?[] roles)
|
||||
{
|
||||
var blob = data.GetBlob() ?? new();
|
||||
return new ApplicationUserData
|
||||
{
|
||||
Id = data.Id,
|
||||
@@ -58,6 +59,8 @@ namespace BTCPayServer.Services
|
||||
Approved = data.Approved,
|
||||
RequiresApproval = data.RequiresApproval,
|
||||
Created = data.Created,
|
||||
Name = blob.Name,
|
||||
ImageUrl = blob.ImageUrl,
|
||||
Roles = roles,
|
||||
Disabled = data.LockoutEnabled && data.LockoutEnd is not null && DateTimeOffset.UtcNow < data.LockoutEnd.Value.UtcDateTime
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user