Skip to content

Commit

Permalink
Fix: Use proper variable for display name drivers in user extender
Browse files Browse the repository at this point in the history
  • Loading branch information
askvortsov1 committed Jun 29, 2020
1 parent e2c4169 commit aaebd35
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Extend/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ class User implements ExtenderInterface
*/
public function displayNameDriver(string $identifier, $driver)
{
$this->drivers[$identifier] = $driver;
$this->displayNameDrivers[$identifier] = $driver;

return $this;
}

public function extend(Container $container, Extension $extension = null)
{
$container->extend('flarum.user.display_name.supported_drivers', function ($existingDrivers) {
return array_merge($existingDrivers, $this->drivers);
return array_merge($existingDrivers, $this->displayNameDrivers);
});
}
}

0 comments on commit aaebd35

Please sign in to comment.