ID:               31586
 User updated by:  ash at theleys dot cambs dot sch dot uk
 Reported By:      ash at theleys dot cambs dot sch dot uk
-Status:           Open
+Status:           Bogus
 Bug Type:         COM related
 Operating System: Win2k or 2k3/IIS5 or 6
 PHP Version:      5.0.3
 New Comment:

Played a lot more, and used () on the end of the method/enumeration
object... Worked.


Previous Comments:
------------------------------------------------------------------------

[2005-01-18 20:04:59] ash at theleys dot cambs dot sch dot uk

Tried the snapshot, but exactly the same results.

------------------------------------------------------------------------

[2005-01-17 23:02:46] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.0-win32-latest.zip

------------------------------------------------------------------------

[2005-01-17 21:05:32] ash at theleys dot cambs dot sch dot uk

Description:
------------
Can't iterate through list of NT Group memberships.
Same code (as VBScript) works in asp page (lists group names.)

Reproduce code:
---------------
try {
 $objUser = new COM("WinNT://myDomain/aUserAccountName");
 foreach ($objUser->Groups as $grp) { 
  echo $grp->Name; 
 }
 $objUser = null;

} catch (Exception $e) {
   echo 'Caught exception: ',  $e->getMessage(), "\n";
}


Expected result:
----------------
List of groups that the account is a member of.

Actual result:
--------------
Caught exception: Error Member not found.  

But ->Groups _is_ the collection of groups...

(Have looked at Bug #25759 COM Instantiation causes Script to fail
silently)


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=31586&edit=1

Reply via email to