Hi Liuk88,
For the change in existing users.
You have to customize the user-dashboard-title component.
for that extend user-dashboard-title component and add user-dashboard-title.get.js to it.
with in that file write logic like below…
var userName=user.name;
var dashboardUrl = "user/"+userName+"/dashboard";
var myDashletUrl = "NEW DASHLET URL";
var siteDashletUrl = "/components/dashlets/my-sites";
var documentDashletUrl = "/components/dashlets/my-documents";
function main(){
var oldComponents = sitedata.findComponents("page", null,dashboardUrl, null);
for ( var i = 0; i < oldComponents.length; i++) {
var componentUrl = oldComponents.properties["url"].toLowerCase();
if((componentUrl==myDashletUrl)==false){
addBulletinDashlet();
}
if((componentUrl==documentDashletUrl)==false){
addDocumentDashlet();
}
if((componentUrl==siteDashletUrl)==false){
addSiteDashlet();
break;
}
}
}
function addBulletinDashlet(){
var bulletinComponent = sitedata.newComponent("page", "component-2-1", dashboardUrl);
bulletinComponent.properties.url = myDashletUrl;
bulletinComponent.save();
}
function addDocumentDashlet(){
var documentComponent = sitedata.newComponent("page", "component-2-2", dashboardUrl);
documentComponent.properties.url = documentDashletUrl;
documentComponent.save();
}
function addSiteDashlet(){
var siteComponent = sitedata.newComponent("page", "component-1-2", dashboardUrl);
siteComponent.properties.url = siteDashletUrl;
siteComponent.save();
}
main();