Copied to clipboard

Flag this post as spam?

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


  • Rasmus Sebulonsen 15 posts 36 karma points
    Sep 12, 2014 @ 10:38
    Rasmus Sebulonsen
    0

    Members in database but not in Umbraco backend

    Hej Our Umbraco,

    I am incorporating a facebook login to an existing login system and i there for use the facebook javascript sdk and AJAX to create a new member and insert this member to the database.

    It is all working fine, the member is created and inserted to the database from a generic handler which is placed in the root of the site and the member is working (can login just as all other members), but when i go to the umbraco backend to see the list of members, the member does not show.

    It is a umbraco v 4.10.1 site.

    How come the member does not show in the umbraco backend when i can see it is in the database? Is there a way to refresh the member list from the database or something like that?

  • Dan Lister 416 posts 1974 karma points c-trib
    Sep 12, 2014 @ 11:05
    Dan Lister
    0

    Hi Rasmus,

    I've no idea if the below will work but you could give it a try. If you have the ID of the member just created directly in the database, the below code tries to find a member with the given ID in it's cache. If not found, it tries to add the member to the cache.

    // Id of the new member to add to the member cache
    var memberId = 1;
    
    // Find all cached members
    var members = umbraco.cms.businesslogic.member.Member.CachedMembers();
    
    // If member is already cached, do not continue
    if (members.ContainsKey(memberId)) 
        return;
    
    // If not, get non cached member
    var member = new umbraco.cms.businesslogic.member.Member(memberId);
    
    // Add to cache
    umbraco.cms.businesslogic.member.Member.AddMemberToCache(member);
    

    Hopefully it might point you in the right direction.

    Thanks, Dan.

  • Rasmus Sebulonsen 15 posts 36 karma points
    Sep 12, 2014 @ 11:28
    Rasmus Sebulonsen
    0

    Thanks FYI Dan,

    I dont think it has something to do with the cache, that i am using when i log in the member so this is working just fine.

    My problem is that the member is created and works perfect but does not show on the list of members in the umbraco backend.

    On the below picture there should be a member called "Rasmus Sebulonsen" because this member is in the database and working perfectly. (and the member "Rasmus Sebulonsen" is neither in one of the other folders ..)

  • Rasmus Sebulonsen 15 posts 36 karma points
    Sep 12, 2014 @ 13:33
    Rasmus Sebulonsen
    0

    sry for wasting your time got it working .... me not thinking .......

  • Robert Godino 40 posts 129 karma points
    Jan 31, 2017 @ 07:11
    Robert Godino
    0

    Hi Rasmus, how did you get it to work? I am having a similar problem.

    My problem is on the forum here:

    https://our.umbraco.org/forum/using-umbraco-and-getting-started/83639-ms-sql-database-changes-are-not-writing-back-to-umbraco-cms-backend

Please Sign in or register to post replies

Write your reply to:

Draft