I have inherited an Umbraco project which appears to have had the "Administrators" user type deleted (my assumption based on the fact that it doesn't appear in the user types list). There is a user type called "ADMIN" which was probably added manually by my predecessor.
From looking in the database I can see the original user type with id 1 and the extra user type with id 5.
I would like to restore the original user type but can't see anything obvious in the database marking this user type as deleted. I would be grateful if somebody could somebody point me in the right direction.
Thanks for the suggestion. I had a look at that project and it effectively just resets the password and unlocks the admin user. Doesn't do anything with the user types. Below is pretty much it:
var user = UmbracoContext.Current.Application.Services.UserService.GetUserById(0);
if (user != null)
{
user.Username = "Admin";
user.IsApproved = true;
user.IsLockedOut = false;
//Save changes
UmbracoContext.Current.Application.Services.UserService.Save(user);
//Change password
UmbracoContext.Current.Application.Services.UserService.SavePassword(user, "Admin1234!");
}
un-delete a user type
I have inherited an Umbraco project which appears to have had the "Administrators" user type deleted (my assumption based on the fact that it doesn't appear in the user types list). There is a user type called "ADMIN" which was probably added manually by my predecessor.
From looking in the database I can see the original user type with id 1 and the extra user type with id 5.
I would like to restore the original user type but can't see anything obvious in the database marking this user type as deleted. I would be grateful if somebody could somebody point me in the right direction.
My Umbraco version is 7.2.8.
I dont know about un-deleting, but you could use this package to reset the default admin user: https://our.umbraco.org/projects/developer-tools/umbraco-admin-reset/
Thanks for the suggestion. I had a look at that project and it effectively just resets the password and unlocks the admin user. Doesn't do anything with the user types. Below is pretty much it:
is working on a reply...