Merge pull request #729 from julceslauhub/master
BUG 9562 If it is the top level of department/manager then "Report To" assignment raises an error SOLVED
This commit is contained in:
@@ -445,10 +445,8 @@ class Derivation
|
||||
* @param string $USR_UID
|
||||
* @return string $aRow['USR_REPORTS_TO']
|
||||
*/
|
||||
function getDenpendentUser ($USR_UID)
|
||||
{
|
||||
//require_once 'classes/model/Users.php';
|
||||
//here the uid to next Users
|
||||
function getDenpendentUser($USR_UID) {
|
||||
//Here the uid to next user
|
||||
$oC = new Criteria();
|
||||
$oC->addSelectColumn(UsersPeer::USR_REPORTS_TO);
|
||||
$oC->add(UsersPeer::USR_UID, $USR_UID);
|
||||
@@ -456,7 +454,7 @@ class Derivation
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$oDataset->next();
|
||||
$aRow = $oDataset->getRow();
|
||||
return $aRow['USR_REPORTS_TO'];
|
||||
return $aRow['USR_REPORTS_TO'] != '' ? $aRow['USR_REPORTS_TO'] : $USR_UID;
|
||||
}
|
||||
|
||||
/* setTasLastAssigned
|
||||
|
||||
Reference in New Issue
Block a user