diff --git a/phpgwapi/inc/class.accounts_ldap.inc.php b/phpgwapi/inc/class.accounts_ldap.inc.php index 8b2ac2fb82..965b750eb7 100644 --- a/phpgwapi/inc/class.accounts_ldap.inc.php +++ b/phpgwapi/inc/class.accounts_ldap.inc.php @@ -962,7 +962,10 @@ $expiredate = time() + ((60 * 60) * (30 * 24)); } - $expires = mktime(2,0,0,date('n',$expiredate), (int)date('d',$expiredate), date('Y',$expiredate)); + if ($expires != -1) + { + $expires = mktime(2,0,0,date('n',$expiredate), (int)date('d',$expiredate), date('Y',$expiredate)); + } $default_group_id = $this->name2id($GLOBALS['phpgw_info']['server']['default_group_lid']); if (!$default_group_id) diff --git a/phpgwapi/inc/class.accounts_sql.inc.php b/phpgwapi/inc/class.accounts_sql.inc.php index f68aad9ddc..58103f3668 100644 --- a/phpgwapi/inc/class.accounts_sql.inc.php +++ b/phpgwapi/inc/class.accounts_sql.inc.php @@ -346,7 +346,10 @@ $expiredate = time() + ((60 * 60) * (30 * 24)); } - $expires = mktime(2,0,0,date('n',$expiredate), (int)date('d',$expiredate), date('Y',$expiredate)); + if ($expires != -1) + { + $expires = mktime(2,0,0,date('n',$expiredate), (int)date('d',$expiredate), date('Y',$expiredate)); + } $default_group_id = $this->name2id($GLOBALS['phpgw_info']['server']['default_group_lid']); if (!$default_group_id)