36 lines
1.5 KiB
C#
36 lines
1.5 KiB
C#
using e_suite.API.Common.models;
|
|
|
|
namespace eSuite.API.Extensions;
|
|
|
|
internal static class UserProfileExtensions
|
|
{
|
|
internal static Models.UserProfile ToUserProfile(this UserProfile userProfile)
|
|
{
|
|
return new Models.UserProfile
|
|
{
|
|
Email = userProfile.Email,
|
|
FirstName = userProfile.FirstName,
|
|
LastName = userProfile.LastName,
|
|
MiddleNames = userProfile.MiddleNames,
|
|
UsingTwoFactorAuthentication = userProfile.UsingTwoFactorAuthentication,
|
|
TwoFactorAuthenticationSettings = userProfile.TwoFactorAuthenticationSettings,
|
|
DomainSsoProviderId = userProfile.DomainSsoProviderId,
|
|
SsoProviderId = userProfile.SsoProviderId ?? -1,
|
|
SsoSubject = userProfile.SsoSubject,
|
|
SsoProviders = userProfile.SsoProviders,
|
|
PreferredLocale = userProfile.PreferredLocale
|
|
};
|
|
}
|
|
|
|
internal static Models.ConfirmEmailAccount ToConfirmEmailAccount(this UserProfile userProfile)
|
|
{
|
|
return new Models.ConfirmEmailAccount
|
|
{
|
|
UsingTwoFactorAuthentication = userProfile.UsingTwoFactorAuthentication,
|
|
TwoFactorAuthenticationSettings = userProfile.TwoFactorAuthenticationSettings,
|
|
DomainSsoProviderId = userProfile.DomainSsoProviderId,
|
|
SsoProviderId = userProfile.SsoProviderId ?? -1,
|
|
SsoProviders = userProfile.SsoProviders,
|
|
};
|
|
}
|
|
} |