Skip to content
Snippets Groups Projects
Commit c6115d8a authored by Kevin Paxman's avatar Kevin Paxman
Browse files

EXPHR: some changes suggested by Igor

parent 00790af8
No related branches found
No related tags found
3 merge requests!297Feature/istwcms 5983 bulk account creation,!274Draft: ISTWCMS-5551: fixing office hours display,!260Feature/istwcms 5668 a5kulkar rename references to publications
......@@ -111,11 +111,12 @@ class UwAddUsersForm extends FormBase {
continue;
}
/** @var UserInterface $existing_user */
$existing_user = user_load_by_name($user);
if ($existing_user) {
$this->messenger()->addError($this->t('The user ID <a href="@link"><em>@user</em></a> already exists and was skipped.',
[
'@link' => $this->pathAliasManager->getAliasByPath('/user/' . $existing_user->uid->value),
'@link' => $this->pathAliasManager->getAliasByPath('/user/' . $existing_user->id),
'@user' => $user,
]
));
......@@ -163,7 +164,7 @@ class UwAddUsersForm extends FormBase {
$this->messenger()->addStatus($this->t('Created a new user with the user ID <a href="@link"><em>@user</em></a>.',
[
'@link' => $this->pathAliasManager->getAliasByPath('/user/' . $new_user->uid->value),
'@link' => $this->pathAliasManager->getAliasByPath('/user/' . $new_user->id()),
'@user' => $user,
]
));
......
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