Skip to content
Snippets Groups Projects
Commit 2a6df061 authored by Uma's avatar Uma
Browse files

Merge branch 'Migration_update' into '7.4.0'

Cleaned up migration to fetch entityfields for userlabel

See merge request !827
parents 48b16520 92d67153
No related branches found
No related tags found
No related merge requests found
......@@ -51,6 +51,7 @@ Vtiger_Edit_Js("Users_Edit_Js",{},{
}
if(newPassword != confirmPassword){
app.helper.showErrorNotification({message :app.vtranslate('JS_REENTER_PASSWORDS')});
editForm.find('.saveButton').removeAttr('disabled');
e.preventDefault();
}
......
......@@ -35,17 +35,11 @@ if (defined('VTIGER_UPGRADE')) {
echo "<br>Successfully added <b>$fieldName</b> field to <b>$moduleName</b><br>";
}
}
$db->pquery("UPDATE vtiger_users SET $fieldName=TRIM(CONCAT(first_name, ' ' , last_name))", array());
echo "<br>Successfully updated <b>$fieldName</b> value as concatenate of firstname and lastname for <b>$moduleName</b> module<br>";
vimport('~modules/Users/CreateUserPrivilegeFile.php');
$result = $db->pquery('SELECT id FROM vtiger_users', array());
$count = $db->num_rows($result);
while ($row = $db->fetch_array($result)) {
$userId = $row['id'];
createUserPrivilegesfile($userId);
echo "<br>Successfully recreated <b>User's privileges</b> file for id:<b>$userId</b><br>";
}
echo "<br>Successfully completed concatenate of firstname and lastname as label in <b>$moduleName</b> module<br>";
$entityFields = Vtiger_Functions::getEntityModuleInfo($moduleName);
$entityFieldNames = explode(',', $entityFields['fieldname']);
$sql = "UPDATE vtiger_users SET $fieldName = TRIM(CONCAT(".implode(' ', $entityFieldNames)."))";
$db->pquery($sql, array());
Vtiger_Access::syncSharingAccess();
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment