checking for isset AND ==0 to determine if mustchangepassword is activated

This commit is contained in:
Klaus Leithoff 2010-10-25 14:07:37 +00:00
parent 298c4ebaf1
commit eb7143d8b9

View File

@ -1003,7 +1003,7 @@
$acl =& CreateObject('phpgwapi.acl',(int)$_GET['account_id']);
$var['anonymous'] = $acl->check('anonymous',1,'phpgwapi') ? '  X' : ' ';
$var['changepassword'] = !$acl->check('nopasswordchange',1,'preferences') ? '  X' : ' ';
$var['mustchangepassword']= $userData['account_lastpwd_change']==0 ? '  X' : ' ';
$var['mustchangepassword']= isset($userData['account_lastpwd_change']) && $userData['account_lastpwd_change']==0 ? '  X' : ' ';
unset($acl);
if ($userData['status'])
@ -1361,7 +1361,7 @@
$acl->read_repository();
$userData['anonymous'] = $acl->check('anonymous',1,'phpgwapi');
$userData['changepassword'] = !$acl->check('nopasswordchange',1,'preferences');
$userData['mustchangepassword'] = ($userData['account_lastpwd_change']==0?true:false);
$userData['mustchangepassword'] = (isset($userData['account_lastpwd_change']) && $userData['account_lastpwd_change']==0?true:false);
unset($acl);
}
else