BUG 7338 User profile "Replaced by" doesn't work when PM derivate a case. SLOVED
- Add a limit, to prevent a infinite bucle (100 or 200) - Counter added if infinite loop
This commit is contained in:
@@ -402,13 +402,15 @@ public function userExists($UsrUid)
|
||||
public function userVacation($UsrUid = "")
|
||||
{
|
||||
$aFields = array();
|
||||
$cnt = 0;
|
||||
do {
|
||||
if ($UsrUid != ""){
|
||||
if ($UsrUid != "" && $cnt < 100) {
|
||||
$aFields = $this->load($UsrUid);
|
||||
$UsrUid = $aFields['USR_REPLACED_BY'];
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
$cnt++;
|
||||
} while ($aFields['USR_STATUS'] != 'ACTIVE');
|
||||
return $aFields;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user