I'm trying to develop a program in php V 4.3.7 to set the mailbox
expiration date for GroupWise users. I can successfully read the
mailboxexpdate attribute of a GroupWise user object using php. When no
expiration date is set for the GW account, php returns -1. When an
expiration date is set for the GW account, php returns the date in a UNIX
epoch format. However, when I try to set the mailboxexpdate of a user
object to a UNIX epoch format using php code, the following error is
displayed: Warning: main(): PropPut() failed: Exception occurred. Source:
User.Object Description: An invalid argument was passed in the function
call. in c:\data\php\test\deactivate.php on line 89. I am update the
visibility of a user using php. I just need to know the format that the
date needs to be in. A little php sample code follows:

# Login to eDirectory.
$nwsess1 = new com("NWSessLib.NWSessCtrl.1");
$nwsess1->Login("nds:\\\\cs\\cs\\ed\\eb\\1\\admin", "user", "password",
false) or die ("could not login to eDirectory.");
if ($dbug) print "Login Completed!<br>";

$nwdir1 = new com("NWDirLib.NWDirCtrl.1");
print "NWDir Control Instantiated Successfully<br>";

print "Setting fullname<br>";
$nwdir1->Fullname = "nds:\\\\cs\\cs\\inactive";

$nwentry = $nwdir1->entries("jdoe1");
print "Fullname property: " . $nwentry->fullname() . "<br>";
print "Fullname for nwdir1 control set to: " . $nwdir1->fullname
() . "<br>";

# Now scan all the post offices for the jdoe account.
$objadminsystem = new com("NovellGroupWareAdmin");
$objadminsystem->Connect ("\\\\GW1\\vol1\\cs1");
$objDomain = $objadminsystem->ConnectedDomain();
$objPostOffices = $objDomain->PostOffices();

$objPostOfficeIterator = $objPostOffices->CreateIterator();
unset ($user);

// Search throught all postoffices.
while ($objpostoffice = $objPostOfficeIterator->Next()) {
// Within each postoffice, search all the users.
$objusers = $objpostoffice->users();
$objuseriterator = $objusers->createiterator();
while ($objuser = $objuseriterator->next()) {
if (strtolower(trim($objuser->name())) == "jdoe1") {
$user = $objuser;
print "User jdoe1 found in postoffice: " . $objpostoffice->name() . "<br>";
if (isset ($user)) break;

if (isset ($user)){
// Set the user's expiration date.

print "Current value of user->mailboxexpdate(): " . $user-
>mailboxexpdate() . "<br>";

$d = time();

# print "About to update mailbox expiration date: ". date ("m/d/Y
G:i:s A", $d) .", Raw timestamp: $d <br>\n";

$user->mailboxexpdate = $d;
$user->visibility = 4;

print "Executing commit!<br>";
print "Commit seccessfully executed!<br>";
print "User: jdoe1 could not be found!<br>";


Thanks in advance!