Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Nik Njegovan 4 posts 27 karma points
    Jul 29, 2014 @ 15:33
    Nik Njegovan
    0

    How can I unlock a user that has been locked out through the database with an sql script?

    I have two admins in my application that have been locked out and I want to unlock them. I have full access to the database but I cant find a isLockedOut column anywhere. 

    How does Umbraco know that a user is locked out?

  • Alex Skrypnyk 6133 posts 23952 karma points MVP 7x admin c-trib
    Oct 08, 2014 @ 12:17
    Alex Skrypnyk
    0

    hi Nik,

    try to use this code :

    var userService = ApplicationContext.Current.Services.UserService;
    var newUserModel = userService.GetUserById(userId);
    if (newUserModel != null)
    {
        newUserModel.IsLockedOut = false;
        userService.Save(newUserModel, false);
    }
    

    User locks in IsLockedOut property.

    Thanks

  • Dave Woestenborghs 3504 posts 12133 karma points MVP 8x admin c-trib
    Oct 08, 2014 @ 12:38
    Dave Woestenborghs
    1

    You can also do it in the DB

    You will find some more information here : http://our.umbraco.org/forum/umbraco-7/using-umbraco-7/52934-Login-Umbraco7?p=1

    Dave

Please Sign in or register to post replies

Write your reply to:

Draft