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:
Shannon
2014-01-23 17:11:58 +11:00
parent 585b42af48
commit 64d1a484bd
8 changed files with 143 additions and 134 deletions

View File

@@ -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>