diff --git a/locale/en_US/admin.xml b/locale/en_US/admin.xml
index 0fb2d85..b9e3bc6 100644
--- a/locale/en_US/admin.xml
+++ b/locale/en_US/admin.xml
@@ -61,8 +61,8 @@
Merge Users
Merge User
Select a user to whom to attribute the previous user's submissions, editing assignments, etc.
- Select a user to merge into another user account (e.g., when someone has two user accounts). The account selected first will be deleted and its submissions, assignments, etc. will be attributed to the second account.
+ Select a user (or several) to merge into another user account (e.g., when someone has two user accounts). The account(s) selected first will be deleted and any submissions, assignments, etc. will be attributed to the second account.
All Enrolled Users
- Are you sure you wish to merge the account with the username "{$oldUsername}" into the account with the username "{$newUsername}"? The account with the username "{$oldUsername}" will not exist afterwards. This action is not reversible.
+ Are you sure you wish to merge the selected {$oldAccountCount} account(s) into the account with the username "{$newUsername}"? The selected {$oldAccountCount} accounts will not exist afterwards. This action is not reversible.
No enrolled users.
diff --git a/locale/en_US/manager.xml b/locale/en_US/manager.xml
index 3ba91fa..cf53958 100644
--- a/locale/en_US/manager.xml
+++ b/locale/en_US/manager.xml
@@ -79,8 +79,8 @@
Remove this user from this conference? This action will unenroll the user from all roles within this conference.
Enroll Existing User
With conference
- Select a user to merge into another account. The account you select here will be deleted and any submissions, editing assignments, etc. will be attributed to another account.
- Select a user to whom to attribute the previous user's presentations, editing assignments, etc.
+ Select a user to merge into another user account (e.g., when someone has two user accounts). The account selected first will be deleted and its submissions, assignments, etc. will be attributed to the second account.
+ Select a user to whom to attribute the previous users' authorships, editing assignments, etc.
Enrollment synchronization will enroll all users enrolled in the specified role in the specified conference into the same role in this conference. This function allows a common set of users (e.g., Reviewers) to be synchronized between conferences.
Plugin was not successfully copied
Delete Plugin
diff --git a/pages/admin/AdminPeopleHandler.inc.php b/pages/admin/AdminPeopleHandler.inc.php
index d6d971f..5032a88 100644
--- a/pages/admin/AdminPeopleHandler.inc.php
+++ b/pages/admin/AdminPeopleHandler.inc.php
@@ -36,22 +36,17 @@ class AdminPeopleHandler extends AdminHandler {
$templateMgr =& TemplateManager::getManager();
- $oldUserId = Request::getUserVar('oldUserId');
+ $oldUserIds = (array) Request::getUserVar('oldUserIds');
$newUserId = Request::getUserVar('newUserId');
- if (!empty($oldUserId) && !empty($newUserId)) {
+ if (!empty($oldUserIds) && !empty($newUserId)) {
import('user.UserAction');
- UserAction::mergeUsers($oldUserId, $newUserId);
+ foreach ($oldUserIds as $oldUserId) {
+ UserAction::mergeUsers($oldUserId, $newUserId);
+ }
Request::redirect(null, null, 'admin', 'mergeUsers');
}
- if (!empty($oldUserId)) {
- // Get the old username for the confirm prompt.
- $oldUser =& $userDao->getUser($oldUserId);
- $templateMgr->assign('oldUsername', $oldUser->getUsername());
- unset($oldUser);
- }
-
// The administrator must select one or both IDs.
if (Request::getUserVar('roleSymbolic')!=null) $roleSymbolic = Request::getUserVar('roleSymbolic');
else $roleSymbolic = isset($args[0])?$args[0]:'all';
@@ -127,7 +122,7 @@ class AdminPeopleHandler extends AdminHandler {
USER_FIELD_INTERESTS => 'user.interests'
));
$templateMgr->assign('alphaList', explode(' ', Locale::translate('common.alphaList')));
- $templateMgr->assign('oldUserId', $oldUserId);
+ $templateMgr->assign('oldUserIds', $oldUserIds);
$templateMgr->assign('rolePath', $roleDao->getRolePath($roleId));
$templateMgr->assign('roleSymbolic', $roleSymbolic);
$templateMgr->display('admin/selectMergeUser.tpl');
diff --git a/pages/manager/PeopleHandler.inc.php b/pages/manager/PeopleHandler.inc.php
index ae83658..e82897d 100644
--- a/pages/manager/PeopleHandler.inc.php
+++ b/pages/manager/PeopleHandler.inc.php
@@ -439,12 +439,17 @@ class PeopleHandler extends ManagerHandler {
$schedConf =& Request::getSchedConf();
$templateMgr =& TemplateManager::getManager();
- $oldUserId = Request::getUserVar('oldUserId');
+ $oldUserIds = (array) Request::getUserVar('oldUserIds');
$newUserId = Request::getUserVar('newUserId');
// Ensure that we have administrative priveleges over the specified user(s).
+ $canAdministerAll = true;
+ foreach ($oldUserIds as $oldUserId) {
+ if (!Validation::canAdminister($conference->getId(), $oldUserId)) $canAdministerAll = false;
+ }
+
if (
- (!empty($oldUserId) && !Validation::canAdminister($conference->getId(), $oldUserId)) ||
+ (!empty($oldUserIds) && !$canAdministerAll) ||
(!empty($newUserId) && !Validation::canAdminister($conference->getId(), $newUserId))
) {
$templateMgr->assign('pageTitle', 'manager.people');
@@ -454,19 +459,14 @@ class PeopleHandler extends ManagerHandler {
return $templateMgr->display('common/error.tpl');
}
- if (!empty($oldUserId) && !empty($newUserId)) {
+ if (!empty($oldUserIds) && !empty($newUserId)) {
import('user.UserAction');
- UserAction::mergeUsers($oldUserId, $newUserId);
+ foreach ($oldUserIds as $oldUserId) {
+ UserAction::mergeUsers($oldUserId, $newUserId);
+ }
Request::redirect(null, null, 'manager');
}
- if (!empty($oldUserId)) {
- // Get the old username for the confirm prompt.
- $oldUser =& $userDao->getUser($oldUserId);
- $templateMgr->assign('oldUsername', $oldUser->getUsername());
- unset($oldUser);
- }
-
// The manager must select one or both IDs.
if (Request::getUserVar('roleSymbolic')!=null) $roleSymbolic = Request::getUserVar('roleSymbolic');
else $roleSymbolic = isset($args[0])?$args[0]:'all';
@@ -542,7 +542,7 @@ class PeopleHandler extends ManagerHandler {
USER_FIELD_INTERESTS => 'user.interests'
));
$templateMgr->assign('alphaList', explode(' ', Locale::translate('common.alphaList')));
- $templateMgr->assign('oldUserId', $oldUserId);
+ $templateMgr->assign('oldUserIds', $oldUserIds);
$templateMgr->assign('rolePath', $roleDao->getRolePath($roleId));
$templateMgr->assign('roleSymbolic', $roleSymbolic);
$templateMgr->display('manager/people/selectMergeUser.tpl');
diff --git a/templates/admin/selectMergeUser.tpl b/templates/admin/selectMergeUser.tpl
index cfd30ff..a445d0a 100644
--- a/templates/admin/selectMergeUser.tpl
+++ b/templates/admin/selectMergeUser.tpl
@@ -12,11 +12,11 @@
{assign var="pageTitle" value="admin.mergeUsers"}
{include file="common/header.tpl"}
{/strip}
-
-
{if $oldUserId != ''}{translate key="admin.mergeUsers.into.description"}{else}{translate key="admin.mergeUsers.from.description"}{/if}
-
+
+
{if !empty($oldUserIds)}{translate key="admin.mergeUsers.into.description"}{else}{translate key="admin.mergeUsers.from.description"}{/if}
+
+
+{if !empty($oldUserIds)}
+ {* Selecting target user; do not include checkboxes on LHS *}
+ {assign var="numCols" value=4}
+{else}
+ {* Selecting user(s) to merge; include checkboxes on LHS *}
+ {assign var="numCols" value=5}
+
+{/if}
+
+
{include file="common/footer.tpl"}
diff --git a/templates/manager/people/selectMergeUser.tpl b/templates/manager/people/selectMergeUser.tpl
index 34ce585..a465f18 100644
--- a/templates/manager/people/selectMergeUser.tpl
+++ b/templates/manager/people/selectMergeUser.tpl
@@ -12,11 +12,11 @@
{assign var="pageTitle" value="manager.people.mergeUsers"}
{include file="common/header.tpl"}
{/strip}
-
-{if $oldUserId != ''}{translate key="manager.people.mergeUsers.into.description"}{else}{translate key="manager.people.mergeUsers.from.description"}{/if}
-
+
+
{if !empty($oldUserIds)}{translate key="manager.people.mergeUsers.into.description"}{else}{translate key="manager.people.mergeUsers.from.description"}{/if}
+
+{if !empty($oldUserIds)}
+ {* Selecting target user; do not include checkboxes on LHS *}
+ {assign var="numCols" value=4}
+{else}
+ {* Selecting user(s) to merge; include checkboxes on LHS *}
+ {assign var="numCols" value=5}
+
+{/if}
{include file="common/footer.tpl"}