Skip to content
Snippets Groups Projects
Commit 48396f88 authored by Eirik Morland's avatar Eirik Morland
Browse files

Issue #3456842 by eiriksm: make it possible to pass account proxy object to ::getTeamsByUser

parent eba2f6b1
No related branches found
No related tags found
1 merge request!67Update TeamManager.php
Pipeline #207142 passed with warnings
......@@ -4,6 +4,7 @@ namespace Drupal\violinist_teams;
use Drupal\Component\Utility\Crypt;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\Core\Session\AccountInterface;
use Drupal\Core\Site\Settings;
use Drupal\Core\State\State;
use Drupal\user\UserInterface;
......@@ -68,7 +69,7 @@ class TeamManager {
* An array of teams the user belong to. Or, if none, an empty array of
* course.
*/
public function getTeamsByUser(UserInterface $user) : array {
public function getTeamsByUser(AccountInterface $user) : array {
$node_storage = $this->entityTypeManager->getStorage('node');
$nids_q = $node_storage
->getQuery()
......
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