28 votes
Accepted

How to unlock the Sitecore admin user account?

If you have direct access to the database, you can run the following from SQL Management Studio: UPDATE aspnet_Membership SET IsLockedOut = 0, FailedPasswordAttemptCount = 0 WHERE ...
user avatar
  • 2,526
16 votes

How to unlock the Sitecore admin user account?

In addition to the answer above, if you have the misery of forgetting the Sitecore password then this will save you: UPDATE [aspnet_Membership] SET [Password]='qOvF8m8F2IcWMvfOBjJYHmfLABc=', [...
user avatar
11 votes

How to unlock the Sitecore admin user account?

There is also an admin page: URL: http://www.yoursite.com/sitecore/admin/unlock_admin.aspx By default, it's disabled so you need to edit the aspx file to set enableUnlockButton to true.
user avatar
  • 1,697
11 votes

How to send email, when users roles change - User Manager customization

One option is to hook into Sitecore's user:updated event (and optionally user:updated:remote). This event is raised when a user has been updated, the remote event handler is raised when a user was ...
user avatar
  • 1,693
11 votes
Accepted

Can I hide disabled users in the User Manager?

I propose hiding users through the use of filtering in the membership provider. Consider using the customFilter attribute used by the Active Directory membership and role providers. Examples shown ...
user avatar
  • 16.4k
10 votes
Accepted

Subscribing to EXM Email: How do you manage multiple contacts using the same computer?

This is a pretty complex issue and question, but you have broken it down excellently to allow me to attempt and pinpoint the issue. I believe the issue you are suffering from is what I have called "...
user avatar
  • 14.3k
10 votes
Accepted

How to add domain name of Programmatically added Users in Sitecore

As @Balaji Kuppuswamy stated in comments, you simply need to include the domain name into the full user name when creating a user: System.Web.Security.Membership.CreateUser(@"sitecore\myuser", "b", "...
user avatar
10 votes
Accepted

Administrator access as a role

Yes, "admin" is not a role and cannot be assigned to a role. You shouldn't do that either. If you need that many admin users, there might be something fishy with your security requirements. You might ...
user avatar
  • 19.1k
8 votes
Accepted

Run powershell script when new user is created

You could consider running a script that fires with the user:created event. Try the following: Step 1 Create a patch which tells SPE to run scripts for the Sitecore event. <configuration xmlns:...
user avatar
  • 16.4k
7 votes

Getting User Roles from Username

To get a user by a username you can use : public class UserRepository { public static User GetUser(string domainName, string userName) { if (User.Exists(domainName + @"\" + userName)) ...
user avatar
  • 17.7k
7 votes

Securing a page with item permissions without redirecting the user away

You will need to use component personalization for this. That means all users get access to the page, but on the personalization rules for components you set exceptions based on security. For example:...
user avatar
7 votes
Accepted

Changing the "Invalid Password" message in User Manager

This message is a dictionary entry in the core database in Sitecore. Go to Sitecore Desktop, switch to core database and find the item: Path: /sitecore/system/Dictionary/F/Failed to set the ...
user avatar
7 votes
Accepted

Check if a user is disabled

You can get this info the other way around. Check the !user.IsApproved property. But first you need to get the user through the membership provider like this: var provider = System.Web.Security....
user avatar
6 votes
Accepted

How to set default wallpaper for virtual user?

The problem could be is that you are using the following: virtualUser.Profile.SetCustomProperty("Wallpaper", "/sitecore/shell/themes/backgrounds/Field.jpg") Try to use the following: virtualUser....
user avatar
6 votes

I packaged a bunch of roles but when seen in next environment, the security access and options did not translate in the next environment

Since you mention the use of TDS, you can manage the synchronization of all Roles and security on item using features available in TDS. This has the advantage that both Roles and the security becomes ...
user avatar
  • 13.6k
5 votes
Accepted

How to remove admin role permissions programatically?

Here is the correct code: var user = Sitecore.Security.Accounts.User.FromName("sitecore\\test", true); RemoveRoles(user); protected void RemoveRoles(Sitecore.Security.Accounts.User user) { ...
user avatar
5 votes

Check if a user is disabled

I think Sitecore PowerShell Extensions could help address both the workflow action feature, as well as finding the users. The following query would provide enabled users in a given domain: Get-User -...
user avatar
  • 16.4k
4 votes
Accepted

What Does the "Reset Settings" button in the User Manager do?

This code is execute when you click this button : [Serializable] public class ResetSettings : Command, ISupportsContinuation { /// <summary> /// Executes the command in the specified ...
user avatar
  • 17.7k
4 votes

How to add domain name of Programmatically added Users in Sitecore

As the other suggested answers suggest is correct. When you are creating a new user programmatically, you can get the Full name by using the following code: string domainUser = Sitecore.Context....
user avatar
  • 4,259
4 votes

Administrator access as a role

As @Gatogordo mentions, you likely shouldn't be using Administrator. This should be a checkbox you use on your 'emergency' account which you use to access things that nobody should access. Inheriting ...
user avatar
  • 6,426
4 votes

Create new user with JSS

It does not exist now. For that you would need an web API which also contains some backend validation to not blow up your user database. In backend you can easily create users using Sitecore API. At ...
user avatar
4 votes
Accepted

Restricting which roles a role can assign

You can't directly set permissions to restrict user to only be able to add certain roles. But you can use Sitecore local managed domain to sort of workaround this issue. Basically, you would have ...
user avatar
3 votes
Accepted

Change password using generate button in User Manager

To make this work you need to follow these 5 steps: Create your own GeneratePassword() method.It should do exactly the same as System.Web.Security.SqlMembershipProvider.GeneratePassword(), but ...
user avatar
3 votes

Can we increase max size of the search box in usermanager?

User Manager uses /sitecore/layout/Layouts/Security/SecurityManager layout. Path to aspx page is /sitecore/shell/Applications/Security/UserManager/UserManager.aspx. Layout uses Grid component from ...
user avatar
3 votes
Accepted

How to perform a faster search on User list

There is, but none of the ways I know of will go via the standard API. The "problem" is; while the standard API will allow you to paginate through the user base, it will not allow you to ...
user avatar
  • 24.3k
2 votes

How to put restriction on Sitecore user to edit only final layout

Updated Response After looking into more details, your issue can be addressed by updating the RenderingLayoutGridBuilder method located inside Sitecore.Shell.Applications.ContentManager.Dialogs....
user avatar
2 votes

How to put restriction on Sitecore user to edit only final layout

Show Field Read Field Write columns in security editor, navigate to /sitecore/templates/System/Templates/Sections/Layout/Layout/__Renderings item and deny field write.
user avatar
  • 858
2 votes

How to put restriction on Sitecore user to edit only final layout

One solution to achieve the desired functionality you can override the Sitecore.Shell.Applications.ContentManager.Dialogs.LayoutDetails.LayoutDetailsForm class. Here is an example of how to do this: ...
user avatar
  • 17.7k
2 votes

Securing a page with item permissions without redirecting the user away

Based on your description, I would assume that you have a page that contains a significant amount of content that is visible to anonymous users (and search engines) but you also want to be able to ...
user avatar
2 votes

What Does the "Reset Settings" button in the User Manager do?

The "Reset Settings" button in the User Manager calls the usermanager:resetsettings command, which in turn executes the Sitecore.Shell.Framework.Commands.UserManager.ResetSettings command class. On ...
user avatar

Only top scored, non community-wiki answers of a minimum length are eligible