Base solution for your next web application
From Nov 21
To Dec 1
Also valid for the
existing customers!
Open Closed

How to implement user management? #19

damir created

I started my project based on the project generated by ABP. Now I need to add usermanagement with login functionality.

There is a Zero project that should offer this functionality but how to use it?

I checked out also the TaskEver project but it is not using the Zero module. I had also problems getting it to run.

Wha is the best way to implement user management?

Best regards, Damir

6 Answer(s)
  • 0
    hikalkan created
    Support Team


    You can extend and use AbpUserManager as shown in module-zero sample. It has all methods to manage (create, update, delete, list, add to roles...) users. You can also use RoleManager. Even you can use repositories if you really need.

  • 0
    damir created

    Thank you for your help!

    I checked out the sample application in Zero module. This implementation is working and is exactly what I need. I tried to implement it the similar way in my application that is using NHibernate instead of EF.

    I added the needed references and code. The problem is I am missing NH mapping files. I am getting error: NHibernate.MappingException: No persister for: TestProject.Users.User

    I see that the mappings already exist in your Zero.NHibernate project.

    How to use the existing mappings? What am I missing?

    Best regards, Damir

  • 0
    hubert created

    I guess you have to add the mapping to fluent NH configuration. In the project Xxx.NHibernate please see the code of XxxDataModule:

    Configuration.DefaultNameOrConnectionString = ConfigurationManager.ConnectionStrings["Default"].ConnectionString;
                    .Mappings(m => m.FluentMappings.AddFromAssembly(Assembly.GetExecutingAssembly()));

    All you need to do is add mapping line pointing to referenced Zero.NHibernate

  • 0
    damir created

    Thx for the hint. I already tried this but with no luck. In couple of variations of my code I managed to get some tables into the DB ( see image ) but this is still far from a working solution.

    I would realy like to use ABP in a project but first I need to solve the user management.

    Is there a working demo of the module Zero sample aplication in combination with NHibernate?

    Regards, Damir

  • 0
    hikalkan created
    Support Team

    NHibernate side is a little out-of-date for module-zero. This is a little normal since I did not documented module-zero and it's work-in-progress. It will be fixed soon. But if you can write missing migrations (based on current state of entities, also maybe running EF migration and see what tables are created) and create mappings, you can contribute to the project source in github.

  • 0
    lcyhjx created

    Is there a way that I invoke the authenticated Web API on Mobility side? For example, an android application or an HTM5 based mobility application?