InvalidParameterException Part 3 - Problem with User Administration

Come into my elgglaxy ;-)

From:- Bill Sawyer


@Dhrup ...
and for documentation purposes,
here are the tables and the column within those tables
that I looked at to find orphaned objects.

Table                              Column        
elgg_access_collections            owner_guid
elgg_access_collections_membership user_guid
elgg_annotations                   owner_guid
elgg_entities                      owner_guid
elgg_entity_relationships          guid_one and
elgg_metadata                      owner_guid
elgg_river                         subject_guid and
object_guid (possibly)
elgg_system_log                    owner_guid
elgg_users_apisessions             user_guid
elgg_users_entity                  guid


I hope this helps with the possible cleaning script.
I checked all those tables for data related to the users I deleted.
I found nothing in them, but I still have missing data. 
And, I still have 208 vs. 211 users (as documented above).


    • oki ;-)

      I've reviewed Bill's list - very minor tweak there.

      now i've got the basics coded for a new utility "ScanORPHAN" which is intended to go and hunt for orphans - any "object" that has lost their owner ;-(

      Here's a little sneak preview ==>


          $ScanTarget                       (RIVER) 
      $nSubmitFunc (SCAN)


      SCAN TARGET ==>
      tables to scan for orphans==>
      elgg_entities                     owner_guid
          guid                           bigint(20)
          owner_guid                   bigint(20)
          site_guid                      bigint(20)
          container_guid              bigint(20)
          time_created                  int(11)
      elgg_users_entity              guid
          last_login                     int(11)
          elgg_entity_relationships      guid_one, guid_two
          guid_one                       bigint(20)
          relationship                   varchar(50)
          guid_two                       bigint(20)
      elgg_access_collections   owner_guid
          owner_guid                   bigint(20)
          site_guid                      bigint(20)   
      elgg_access_collections_membership user_guid
          user_guid                      int(11)
          access_collection_id     int(11)    
      elgg_annotations              owner_guid
          id                             int(11)
          entity_guid                   bigint(20)
          owner_guid                   bigint(20)
          time_created                 int(11)    
      elgg_metadata                  owner_guid
          entity_guid                   bigint(20)
          owner_guid                  bigint(20)        
          name_id                       int(11)
          value_id                       int(11)
          time_created                int(11)
      elgg_river                         subject_guid, object_guid
          subject_guid                int(11)
          object_guid                  int(11)
          posted                         int(11)    
      elgg_system_log              owner_guid
          performed_by_guid      int(11)
          owner_guid                  int(11)
          time_created                int(11)
      elgg_users_apisessions   user_guid
          user_guid                     bigint(20)
          site_guid                      bigint(20)
          expires                        int(11)

    • @Dhrup ... will look forward to seeing this utility. I will be more than happy to test it out for you.

    • managed to make some progress on the code for scanORPHAN.php, but seems it will take time ;-)

    • **** need code/ db research assistance here ==>

      FROM `elgg_metastrings`
      WHERE `string` LIKE '%file/%'

      will identify metadata which points to a "file" object

      there must be other unique wildcards which also identify other "objects"
      can someone please volunteer to do this research ?

      thx.. ;-)

    • I think the problem is the first "%. Just use LIKE 'file/%'. I ran this query through phpMyAdmin, and it worked:

      SELECT * FROM elggmetastrings WHERE string LIKE 'file/%'

      The initial wildcard throws off the search.

    • of course..! my dyslexia ;-( but.. might there be *other types of wildcards that will find diff objects, beyond file/ ?

    • Well, elgg_entities has a type and subtype. That might get you what you want.

      Also, I went through my own elgg_metastrings. I can't be assured I have "every" possibility, but you might consider the following:

      "file/%' points to a file

      "friends::" points to a friend entry

      "http://" and "https://" points to a bookmark

      "image/" points to a image. There are "image/bmp", "image/jpeg", "image/pjpeg", and "image/x-png" at the very least.

      Hope that helps.

    • thx.. getting better.... shows you how little test data i have on my xamppp ;-)

    • Well, given that my site is relatively new and only around 250 users or so, I wouldn't say I have every data instance either. But, those are definitely in the data.

      Where does elgg store the large binary objects like files and images?

    • e.g. for userID "admin" ==>

      • DataDir/a/d/m/i/n/admin/...

      but.. this will change in v1.7++