Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-24734

Users (eztextfileuser) created in wrong group

    XMLWordPrintable

Details

    Description

      When you register users using file textfile.ini the DefaultUserGroup is set to 12 and in the comment say "Could be node id or group name" but it doesn't true.

      As you can see in the file ./kernel/classes/datatypes/ezuser/eztextfileuser.php line 181 it uses the object id:

      else if ( $UserGroupType == "id" )
       {
      	 $groupID = $UserGroup;
      	 $groupQuery = "SELECT ezcontentobject_tree.node_id
      							FROM ezcontentobject, ezcontentobject_tree
      							WHERE ezcontentobject.id='$groupID'
      							AND ezcontentobject.id=ezcontentobject_tree.contentobject_id";
      	 $groupObject = $db->arrayQuery( $groupQuery );
      
      	 if ( count( $groupObject ) > 0  )
      	 {
      		 $defaultUserPlacement = $groupObject[0]['node_id'];
      	 }
       }
      

      And the object id 12 are the admin group. By default It register users as admin.

      The easiest way to fix it is changing de number to 11 and the doc from this:

      # Default place to store users from textfile. Could be node id or group name,
      DefaultUserGroup=12
      

      To this:

      # Default place to store users from textfile. Could be object id or group name,
      DefaultUserGroup=11
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            tukx tukx
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: