From 71b16171cfcbc586f8b044932f5ba0a42f26de45 Mon Sep 17 00:00:00 2001 From: Miles Lott Date: Sat, 8 Sep 2001 05:12:36 +0000 Subject: [PATCH] Default expires now one week from today, instead of 12-31-1969 --- admin/inc/class.uiaccounts.inc.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/admin/inc/class.uiaccounts.inc.php b/admin/inc/class.uiaccounts.inc.php index 0862ec71dc..4cf70eee21 100755 --- a/admin/inc/class.uiaccounts.inc.php +++ b/admin/inc/class.uiaccounts.inc.php @@ -844,9 +844,11 @@ } else { - $userData['account_expires_month'] = date('m',$userData['expires']); - $userData['account_expires_day'] = date('d',$userData['expires']); - $userData['account_expires_year'] = date('Y',$userData['expires']); + /* Change this to be an admin/setup setting. For now, default to expire one week from today. */ + $time_var = time() + (60*60*24*7); + $userData['account_expires_month'] = date('m',$userData['expires'] ? $userData['expires'] : $time_var); + $userData['account_expires_day'] = date('d',$userData['expires'] ? $userData['expires'] : $time_var); + $userData['account_expires_year'] = date('Y',$userData['expires'] ? $userData['expires'] : $time_var); } } $page_params['menuaction'] = 'admin.boaccounts.'.($_account_id?'edit':'add').'_user';