I found the problem! The problem is that I want to get Current user Information in NavigationProvider to generate menu items according to user Roles ! and when NavigationProvider Creates menu No user is Logged in.
So my question changed to this:
HOW CAN I GENERATE MENU ACCORDING TO USER ROLES?
Thank You, but User is logged in and U use module-zero
I create it from Templates
this code
Thread.CurrentPrincipal.Identity.GetUserId()
Returns null and
Thread.CurrentPrincipal.Identity.IsAuthenticated
is False !
I made UserValidator Like this
UserValidator = new UserValidator<User, long>(this)
{
RequireUniqueEmail = false,
AllowOnlyAlphanumericUserNames = false
};
in the constructor of UserManager, but it still has Error on Emails. I want to Use One Email for All users and Authenticate them only by UserName;
I wrote PasswordValidator like this
PasswordValidator = new PasswordValidator() {
RequiredLength = 6,
RequireNonLetterOrDigit = false,
RequireDigit = false,
RequireLowercase = false,
RequireUppercase = false
};
but I Can't create UserValidator because of its arguments
UserValidator = new UserValidator<ApplicationUser>(manager)
{
AllowOnlyAlphanumericUserNames = false,
RequireUniqueEmail = false
};
what is "ApplicationUser" and "manager" in Module Zero?
Can You help me to override "UserValidator" ?
You are right , but "UserValidator" is not in override methods,
How can I override it?
<cite>hikalkan: </cite> Can you open an issue for that on github (<a class="postlink" href="https://github.com/aspnetboilerplate/module-zero/issues/new">https://github.com/aspnetboilerplate/mo ... issues/new</a>)? You may use SetRoles method for now.
Thank You SetRoles works Great !
I add Some code in header.js and it works !
$rootScope.$on('$routeChangeStart', function() {
ngProgress.start();
});
$rootScope.$on('$routeChangeSuccess', function() {
ngProgress.complete();
});
Can We Use ngProgress ? How?