Uploaded image for project: 'COmanage'
  1. COmanage
  2. CO-1840

Menu OrgIdentity list is wrong

    XMLWordPrintable

Details

    Description

      Under the user's menu we get a list of the available OrgIdentities linked to the user for the CO the user chose. If we link and unlink an OrgIdentity multiple times then we will have a list of the same OrgIdentity or Identifier, etc. The reason for this seems to be the changelog behavior.

      The buggy code is in

      app/Controller/AppController.php

      Show all

      1215
            $this->loadModel('CoOrgIdentityLink');
      1216
            $this->loadModel('OrgIdentity');
      1217
       
      1218
            $args = array();
      1219
            $args['joins'][0]['table'] = 'co_org_identity_links';
      1220
            $args['joins'][0]['alias'] = 'CoOrgIdentityLink';
      1221
            $args['joins'][0]['type'] = 'INNER';
      1222
            $args['joins'][0]['conditions'][0] = 'OrgIdentity.id=CoOrgIdentityLink.org_identity_id';
      1223
            $args['joins'][1]['table'] = 'identifiers';
      1224
            $args['joins'][1]['alias'] = 'Identifier';
      1225
            $args['joins'][1]['type'] = 'INNER';
      1226
            $args['joins'][1]['conditions'][0] = 'OrgIdentity.id=Identifier.org_identity_id';
      1227
            $args['conditions']['CoOrgIdentityLink.co_person_id'] = $userId;
      1228
            $args['conditions']['Identifier.status'] = StatusEnum::Active;
      1229
            $args['conditions']['Identifier.login'] = true;
      1230
       
      1231
            $userOrgIDs = $this->CoOrgIdentityLink->OrgIdentity->find('all', $args);
      

      • Tested on the develop branch
         

      Attachments

        Issue Links

          Activity

            People

              benn.oshrin@at.internet2.edu Benn Oshrin
              ioannis.igoumenos@at.internet2.edu Ioannis Eythymios Igoumenos
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: