Base solution for your next web application

Activities of "zana"

added

  1. enabled $locationProvider.html5Mode with ... $locationProvider.html5Mode(true);
  2. <base href="/" /> to layout <head />.

but navigation not worked with html5 mode true

How can I assign the ‘EmailService’ property on the UserManager to the ‘EmailService’ class Can I extend the UserManager : AbpUserManager<Tenant, Role, User> in IdentityConfig?

ex: /***************************************/ public class ApplicationRoleManager : RoleManager<IdentityRole> { public ApplicationRoleManager(IRoleStore<IdentityRole,string> roleStore) : base(roleStore) { }

    public static ApplicationRoleManager Create(IdentityFactoryOptions&lt;ApplicationRoleManager&gt; options, IOwinContext context)
    {
        return new ApplicationRoleManager(new RoleStore&lt;IdentityRole&gt;(context.Get&lt;ApplicationDbContext&gt;()));
    }
}

public class EmailService : IIdentityMessageService

/***********************************/

I need to GenerateEmailConfirmationTokenAsync, and must implement IUserTokenProvider. I drive class UserManager : AbpUserManager<Tenant, Role, User>, IUserTokenProvider<User, long>

implememted the interface public Task<string> GenerateAsync(string purpose, UserManager<User, long> manager, User user) { Guid resetToken = Guid.NewGuid(); user.PasswordResetToken = resetToken; manager.UpdateAsync(user); return Task.FromResult<string>(resetToken.ToString()); }

    public Task&lt;bool&gt; IsValidProviderForUserAsync(UserManager&lt;User, long&gt; manager, User user)
    {
        if (manager == null) throw new ArgumentNullException();
        else
        {
            return Task.FromResult&lt;bool&gt;(manager.SupportsUserPassword);
        }
    }

    public Task NotifyAsync(string token, UserManager&lt;User, long&gt; manager, User user)
    {

        return Task.FromResult&lt;int&gt;(0);
    }

    public Task&lt;bool&gt; ValidateAsync(string purpose, string token, UserManager&lt;User, long&gt; manager, User user)
    {
        return Task.FromResult&lt;bool&gt;(user.PasswordResetToken.ToString() == token);
    }

added a property PasswordResetToken to User : AbpUser<Tenant, User>

But get Error, DbContext' context has changed since the database was created. Could you explain how to implement IUserTokenProvider, for usermanager

Showing 1 to 3 of 3 entries