Copied to clipboard

Flag this post as spam?

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


  • Hardy Wang 91 posts 112 karma points
    Mar 09, 2012 @ 21:52
    Hardy Wang
    0

    User account suddenly disappeared

    Hi ll,

    I am using 4.7, I am the admin user of the site. While I was using the backoffice it was logged out all of sudden. No matter how I tried I could not login.

    I checked umbracoUser database table, my account record was still there. I asked another admin logged in to check and from UI's Users section my name disappeared!

    Anybody has clue what happened to my account?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Mar 10, 2012 @ 09:35
    Jan Skovgaard
    0

    Hi Hardy

    Hmm sounds like someone perhaps disabled your user account unintentionally while you where logged in?

    I've experienced that for some weird reason disabling users in the backoffice makes them disappear visually from the list instead of just fading the text out. Think I will report it as a bug.

    So perhaps you need to check the DB and see if there has been set a flag in "disabled" or whatever the column name in the DB is?

    /Jan

  • Hardy Wang 91 posts 112 karma points
    Mar 10, 2012 @ 14:20
    Hardy Wang
    0

    I am pretty sure other admin did not disable my account, because I checked the DB the orphaned account was still enabled.

    When the other admin created my account again, he was able to use same username without warning. And I still could not log on until I went to DB to change username of my lost accout to something else.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Mar 10, 2012 @ 14:27
    Jan Skovgaard
    0

    Hi Hardy

    Yes that indeed is very odd. Unfortunately I'm out of ideas about what is causing it...You guys have not made some customizatoins to the default provider handling the users in Umbraco?

    /Jan

  • Hardy Wang 91 posts 112 karma points
    Mar 10, 2012 @ 15:04
    Hardy Wang
    0

    I did not change any providers yet, I was working on template, content, media, create new memembers e.t.c

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Mar 15, 2012 @ 22:58
    Jan Skovgaard
    0

    Hi Hardy

    Did you manage to figure out what happened?

    /Jan

  • Hardy Wang 91 posts 112 karma points
    Mar 16, 2012 @ 13:53
    Hardy Wang
    0

    I am never able to figure out the reason.

  • Calvin Frei 106 posts 314 karma points
    Jun 10, 2016 @ 15:44
    Calvin Frei
    1

    Maybe you solved the problem (because i'ts 4 years ago) but I had the same problem with 7.4.3. So I write here how I solved it, maybe someone else has the same problem (hopefully not)...


    What I figured out, is that you cannot trust what is stored in the database (because it's cached?). I had to do everything on the UserService.

    What I did is to change almost every property to something else than umbraco (or the cache/database) could expect...

    Maybe you can do GetById() but I wanted to be sure... and maybe you do not have to set a different username, but again I wanted to be sure...

    int total;
    var all = ApplicationContext.Current.Services.UserService.GetAll(0, 1000, out total);
    
    var user = all.First();
    
    user.Username = "IAMLOCKEDOUT"; // To be sure umbraco does not check against "admin"?
    user.Email = "IAMLOCKEDOUT"; // To be sure umbraco does not check against "admin"?
    user.Name = "IAMLOCKEDOUT"; // To be sure umbraco does not check against "admin"?
    user.FailedPasswordAttempts = 0;
    user.IsLockedOut = false;
    user.IsApproved = true;
    user.LastLockoutDate = DateTime.MinValue;
    user.UserType = ApplicationContext.Current.Services.UserService.GetUserTypeById(3); // Set something else than admin...
    
    ApplicationContext.Current.Services.UserService.Save(user);
    

    And then you have to set back to user type 'admin' (maybe this step isn't needed)

     int total;
    var all = ApplicationContext.Current.Services.UserService.GetAll(0, 1000, out total);
    
    var user = all.First();
    
    user.UserType = global::Umbraco.Core.ApplicationContext.Current.Services.UserService.GetUserTypeById(1); // Set back to admin...
    
    ApplicationContext.Current.Services.UserService.Save(user);
    

    Now you should be able to login and change the username etc. back to whatever you want.

    This solved the problem for me...

Please Sign in or register to post replies

Write your reply to:

Draft