Replace User::getCompleteNameWithUsername with formatUserFullName

pull/3064/head
Julio Montoya 5 years ago
parent 44391be5c9
commit e1d5e0ed9d
  1. 2
      main/session/resume_session.php
  2. 2
      plugin/buycourses/src/buycourses.ajax.php
  3. 2
      plugin/buycourses/src/service_process.php
  4. 2
      plugin/buycourses/src/services_add.php
  5. 2
      plugin/buycourses/src/services_edit.php

@ -187,7 +187,7 @@ if ($session->getNbrCourses() === 0) {
if ($coachSubscriptions) {
/** @var SessionRelCourseRelUser $subscription */
foreach ($coachSubscriptions as $subscription) {
$namesOfCoaches[] = $subscription->getUser()->getCompleteNameWithUserName();
$namesOfCoaches[] = UserManager::formatUserFullName($subscription->getUser(), true);
}
}

@ -465,7 +465,7 @@ switch ($action) {
$nodeType = get_lang('User');
/** @var User $user */
$user = UserManager::getManager()->find($serviceSale['node_id']);
$nodeName = $user ? $user->getCompleteNameWithUsername() : null;
$nodeName = $user ? UserManager::formatUserFullName($user, true) : null;
} else {
if ($nodeType == BuyCoursesPlugin::SERVICE_TYPE_COURSE) {
$nodeType = get_lang('Course');

@ -98,7 +98,7 @@ if ($typeUser) {
/** @var User $user */
foreach ($users as $user) {
if (intval($userInfo['user_id']) !== intval($user->getId())) {
$selectOptions[$user->getId()] = $user->getCompleteNameWithUsername();
$selectOptions[$user->getId()] = UserManager::formatUserFullName($user, true);
}
}
}

@ -17,7 +17,7 @@ $users = UserManager::getRepository()->findAll();
$userOptions = [];
if (!empty($users)) {
foreach ($users as $user) {
$userOptions[$user->getId()] = $user->getCompleteNameWithUsername();
$userOptions[$user->getId()] = UserManager::formatUserFullName($user, true);
}
}

@ -23,7 +23,7 @@ $users = UserManager::getRepository()->findAll();
$userOptions = [];
if (!empty($users)) {
foreach ($users as $user) {
$userOptions[$user->getId()] = $user->getCompleteNameWithUsername();
$userOptions[$user->getId()] = UserManager::formatUserFullName($user, true);
}
}

Loading…
Cancel
Save