IdentityManager icon indicating copy to clipboard operation
IdentityManager copied to clipboard

ApplicationUser custom proprety

Open bcouch opened this issue 9 years ago • 1 comments

Thank you so much for IdentityManager. I have a small issue I am hoping you may be willing to assist me with. I can add a string, int, or bool property to ApplicationUser and it works as expected but if I add a DateTime or decimal the property gets added to the AspNetUsers table in the database but does not show on the edit user view of IdentityManager like the other property types do. Am I missing something?

Thank you in advance for your time.

-Barry

bcouch avatar Nov 16 '16 20:11 bcouch

public enum PropertyDataType { String = 0, Password = 1, Email = 2, Url = 3, Number = 4, Boolean = 5, }

It is property type declaration from project. DateTime is not supported(Seems it is not expandable functionality from outside)

To add it manually u must:

c#

  • Extend PropertyDataType with needed types
  • Extend extension methods PropertyInfoExtensions.GetPropertyDataType

html

  • in Templates/users/new.html extend <div ng-switch on="property.meta.dataType"> section with your template (ng-switch-when="<PropertyDataType.EnumerationValue>")
  • Same for Templates/users/property.html

BlackGad avatar Nov 21 '16 16:11 BlackGad