0
lalitChougule created
- ABP Framework version: v2.7.0
- UI type: Angular
- Tiered (MVC) or Identity Server Seperated (Angular): no / yes
- Exception message and stack trace:N.A
- Steps to reproduce the issue:N.A
Hi,
I am trying to use CurrentUser by using Abp functionality
Volo.Abp.Users.ICurrentUser
Volo.Abp.Application.Services.ApplicationService.CurrentUser{get;}
I am not able to get CurrentUser details Please find my code below for reference :
public virtual async Task<SomeDto> GetDetailsByUserId()
{
var CurrentId = CurrentUser.Id;
var SomeId = _someRepository.Where(x => x.UserId == CurrentId)
.Select(x => x.someData).FirstOrDefault();
return _someOtherRepository.Where(x => x.SomeId == SomeId).Select(x => x.SomeCode).ToList();
}
2 Answer(s)
-
0
Continues for the same question Is there any way to get Current User Id in angular ?
-
0
Hi,
Are you logged in to the application? Can you share the request message? thanks.