Merge remote-tracking branch 'upstream/release/3.2.1' into bugfix/FBI-1684
This commit is contained in:
@@ -290,18 +290,14 @@ EOT;
|
||||
$taskOpts[$validOpts[$optName]] = $optArg;
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
$token = strtotime("now");
|
||||
PMException::registerErrorLog($e, $token);
|
||||
echo self::error( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
|
||||
echo self::error( "Invalid options: " . $e->getMessage() ) . "\n\n";
|
||||
self::help( $taskName );
|
||||
return;
|
||||
}
|
||||
try {
|
||||
call_user_func( $taskData['function'], $arguments, $taskOpts );
|
||||
} catch (Exception $e) {
|
||||
$token = strtotime("now");
|
||||
PMException::registerErrorLog($e, $token);
|
||||
echo self::error( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
|
||||
echo self::error( "\n Error executing '$taskName':\n\n {$e->getMessage()}\n" ) . "\n";
|
||||
global $tempDirectory;
|
||||
if (!empty($tempDirectory)) {
|
||||
G::rm_dir($tempDirectory);
|
||||
|
||||
@@ -1710,16 +1710,6 @@ class workspaceTools
|
||||
|
||||
if (Installer::isset_site($workspaceName)) {
|
||||
if ($overwrite) {
|
||||
if ($workspace->dbInfo['DB_NAME'] == $workspace->dbInfo['DB_RBAC_NAME']) {
|
||||
$newDatabases = 1;
|
||||
} else {
|
||||
$newDatabases = 3;
|
||||
}
|
||||
|
||||
if ($newDatabases != $oldDatabases) {
|
||||
throw new Exception("We can't overwrite this workspace because it has a different amount of databases. Not only the 'source' but also the 'target' must have the same amount of databases.");
|
||||
}
|
||||
|
||||
if (!$workspace->workspaceExists()) {
|
||||
throw new Exception('We can not overwrite this workspace because the workspace ' . $workspaceName . ' does not exist please check the lower case and upper case.');
|
||||
}
|
||||
|
||||
@@ -195,6 +195,16 @@ class Users extends BaseUsers
|
||||
$translation = $translations->loadByCode($aFields['USR_DEFAULT_LANG']);
|
||||
$aFields['USR_DEFAULT_LANG_NAME'] = $translation['LANGUAGE_NAME'];
|
||||
|
||||
//Get the fullName with the correct format related to the settings
|
||||
$conf = new \Configurations();
|
||||
$confEnvSetting = $conf->getFormats();
|
||||
$aFields['USR_FULLNAME'] = $conf->usersNameFormatBySetParameters(
|
||||
$confEnvSetting['format'],
|
||||
$aFields['USR_USERNAME'],
|
||||
$aFields['USR_FIRSTNAME'],
|
||||
$aFields['USR_LASTNAME']
|
||||
);
|
||||
|
||||
$result = $aFields;
|
||||
|
||||
return $result;
|
||||
|
||||
@@ -566,12 +566,13 @@ class Light
|
||||
$gestor = fopen($direction, "r");
|
||||
$contenido = fread($gestor, filesize($direction));
|
||||
fclose($gestor);
|
||||
$oUser = new \Users();
|
||||
$oUser = new \Users();
|
||||
$aUserLog = $oUser->loadDetailed($userUid);
|
||||
$response['userId'] = $aUserLog['USR_UID'];
|
||||
$response['userName'] = $aUserLog['USR_USERNAME'];
|
||||
$response['firstName'] = $aUserLog['USR_FIRSTNAME'];
|
||||
$response['lastName'] = $aUserLog['USR_LASTNAME'];
|
||||
$response['fullName'] = $aUserLog['USR_FIRSTNAME'].' '.$aUserLog['USR_LASTNAME'];
|
||||
$response['fullName'] = $aUserLog['USR_FULLNAME'];
|
||||
$response['email'] = $aUserLog['USR_EMAIL'];
|
||||
$response['userRole'] = $aUserLog['USR_ROLE_NAME'];
|
||||
$response['userPhone'] = $aUserLog['USR_PHONE'];
|
||||
|
||||
Reference in New Issue
Block a user