Department user validation problem fixed
This commit is contained in:
@@ -415,9 +415,9 @@ function getDepartments( $DepParent ) {
|
||||
$manager = $oDepartment->getDepManager();
|
||||
if ($manager != ''){
|
||||
$UserUID = $RBAC->load($manager);
|
||||
$node['DEP_MANAGER_USERNAME'] = $UserUID['USR_USERNAME'];
|
||||
$node['DEP_MANAGER_FIRSTNAME'] = $UserUID['USR_FIRSTNAME'];
|
||||
$node['DEP_MANAGER_LASTNAME'] = $UserUID['USR_LASTNAME'];
|
||||
$node['DEP_MANAGER_USERNAME'] = isset($UserUID['USR_USERNAME'])?$UserUID['USR_USERNAME']:'';
|
||||
$node['DEP_MANAGER_FIRSTNAME'] = isset($UserUID['USR_FIRSTNAME'])?$UserUID['USR_FIRSTNAME']:'';
|
||||
$node['DEP_MANAGER_LASTNAME'] = isset($UserUID['USR_LASTNAME'])?$UserUID['USR_FIRSTNAME']:'';
|
||||
}else{
|
||||
$node['DEP_MANAGER_USERNAME'] = '';
|
||||
$node['DEP_MANAGER_FIRSTNAME'] = '';
|
||||
|
||||
@@ -97,6 +97,14 @@ public function userExists($UsrUid)
|
||||
throw(new Exception( "The row '" . $UsrUid . "' in table USER doesn't exist!" ));
|
||||
}
|
||||
}
|
||||
catch (PropelException $e){ //capture invalid birthday date and replace by null
|
||||
$msg = $e->getMessage();
|
||||
if (strpos('Unable to parse value of [usr_birthday]', $msg) != -1) {
|
||||
$oRow->setUsrBirthday(null);
|
||||
$oRow->save();
|
||||
return $this->load($UsrUid);
|
||||
}
|
||||
}
|
||||
catch (Exception $oError) {
|
||||
throw($oError);
|
||||
}
|
||||
|
||||
@@ -245,7 +245,6 @@ switch ($_POST['action'])
|
||||
case 'updateDepartment':
|
||||
try{
|
||||
$dep_name = $_REQUEST['name'];
|
||||
echo $dep_name;
|
||||
$dep_uid = $_REQUEST['uid'];
|
||||
$dep_manager = $_REQUEST['manager'];
|
||||
$dep_status = $_REQUEST['status'];
|
||||
|
||||
Reference in New Issue
Block a user