BUG 9717 I add attribute USR_STATUS SOLVED

I add attribute USR_STATUS
This commit is contained in:
Brayan Osmar Pereyra Suxo
2012-11-13 10:19:29 -04:00
parent 39380dd7a1
commit cbef4fd4cb
2 changed files with 17 additions and 1 deletions

View File

@@ -72,6 +72,22 @@ foreach ($_POST['aUsers'] as $sUser) {
foreach ($aAttributes as $value) {
if (isset($aUser[$value['attributeUser']])) {
$aData[$value['attributeUser']] = str_replace( "*", "'", $aUser[$value['attributeUser']] );
if ($value['attributeUser'] == 'USR_STATUS') {
$evalValue = $aData[$value['attributeUser']];
$statusValue = 'INACTIVE';
if (is_string($evalValue) && $evalValue == 'ACTIVE') {
$statusValue = 'ACTIVE';
}
if (is_bool($evalValue) && $evalValue == true) {
$statusValue = 'ACTIVE';
}
if ( (is_float($evalValue) || is_int($evalValue) ||
is_integer($evalValue) || is_numeric($evalValue)) && (int)$evalValue != 0) {
$statusValue = 'ACTIVE';
}
$aData[$value['attributeUser']] = $statusValue;
}
}
}
}