Fixes User Id issues with HasIdentity, wraps legacy UserType to the new service, fixes the uninstalling db schema to not throw exceptions and clog up the unit test log.
This commit is contained in:
@@ -351,7 +351,7 @@ namespace Umbraco.Core.Services
|
||||
var user = GetByUsername(login);
|
||||
return user.ProfileData;
|
||||
}
|
||||
|
||||
|
||||
public IUser GetUserById(int id)
|
||||
{
|
||||
using (var repository = _repositoryFactory.CreateUserRepository(_uowProvider.GetUnitOfWork()))
|
||||
@@ -360,6 +360,15 @@ namespace Umbraco.Core.Services
|
||||
}
|
||||
}
|
||||
|
||||
public IEnumerable<IUserType> GetAllUserTypes(params int[] ids)
|
||||
{
|
||||
var uow = _uowProvider.GetUnitOfWork();
|
||||
using (var repository = _repositoryFactory.CreateUserTypeRepository(uow))
|
||||
{
|
||||
return repository.GetAll(ids);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets an IUserType by its Alias
|
||||
/// </summary>
|
||||
@@ -375,6 +384,14 @@ namespace Umbraco.Core.Services
|
||||
}
|
||||
}
|
||||
|
||||
public IUserType GetUserTypeById(int id)
|
||||
{
|
||||
using (var repository = _repositoryFactory.CreateUserTypeRepository(_uowProvider.GetUnitOfWork()))
|
||||
{
|
||||
return repository.Get(id);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets an IUserType by its Name
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user