using System; using Volo.Abp.Data; using Volo.Abp.Identity; namespace Sozsoft.Platform.Extensions; public static class AbpIdentityUserExtensions { public static string GetFullName(this IdentityUser user) { return $"{user.Name} {user.Surname}".Trim(); } //IsVerified public static void SetIsVerified(this IdentityUser user, bool isVerified) { user.SetProperty(PlatformConsts.AbpIdentity.User.IsVerified, isVerified); } public static bool GetIsVerified(this IdentityUser user) { return user.GetProperty(PlatformConsts.AbpIdentity.User.IsVerified); } //Login End Date public static void SetLoginEndDate(this IdentityUser user, DateTime? value) { user.SetProperty(PlatformConsts.AbpIdentity.User.LoginEndDate, value); } public static DateTime? GetLoginEndDate(this IdentityUser user) { return user.GetProperty(PlatformConsts.AbpIdentity.User.LoginEndDate); } //Rocket Username public static void SetRocketUsername(this IdentityUser user, string rocketUsername) { user.SetProperty(PlatformConsts.AbpIdentity.User.RocketUsername, rocketUsername); } public static string GetRocketUsername(this IdentityUser user) { return user.GetProperty(PlatformConsts.AbpIdentity.User.RocketUsername); } //Work Hour public static void SetWorkHour(this IdentityUser user, string workHour) { user.SetProperty(PlatformConsts.AbpIdentity.User.WorkHour, workHour); } public static string GetWorkHour(this IdentityUser user) { return user.GetProperty(PlatformConsts.AbpIdentity.User.WorkHour); } //DepartmentId public static void SetDepartmentId(this IdentityUser user, string departmentId) { user.SetProperty(PlatformConsts.AbpIdentity.User.DepartmentId, departmentId); } public static string GetDepartmentId(this IdentityUser user) { return user.GetProperty(PlatformConsts.AbpIdentity.User.DepartmentId); } //JobPositionId public static void SetJobPositionId(this IdentityUser user, string jobPositionId) { user.SetProperty(PlatformConsts.AbpIdentity.User.JobPositionId, jobPositionId); } public static string GetJobPositionId(this IdentityUser user) { return user.GetProperty(PlatformConsts.AbpIdentity.User.JobPositionId); } }