Skip to content
This repository has been archived by the owner on Aug 18, 2024. It is now read-only.

Commit

Permalink
Standardise name of user property
Browse files Browse the repository at this point in the history
  • Loading branch information
autopoietic authored and Tom Readings committed Apr 19, 2017
1 parent 1e6f95f commit dc2724c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Plugin/views/argument_default/Membership.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class Membership extends ArgumentDefaultPluginBase implements CacheableDependenc
*
* @var \Drupal\Core\Session\AccountInterface
*/
protected $user;
protected $ogUser;

/**
* Constructs a new User instance.
Expand All @@ -64,7 +64,7 @@ public function __construct(array $configuration, $plugin_id, $plugin_definition

$this->ogContext = $og_context;
$this->ogMembership = $og_membership;
$this->user = $og_user;
$this->ogUser = $og_user;

This comment was marked as outdated.

Copy link
@amitaibu

amitaibu Apr 19, 2017

Member

why not user?

This comment was marked as outdated.

Copy link
@amitaibu

amitaibu Apr 19, 2017

Member

sorry, I mean why not $user?

}

/**
Expand Down Expand Up @@ -139,7 +139,7 @@ public function getCacheTags() {
* An array of groups, or an empty array if no group is found.
*/
protected function getCurrentUserGroupIds($entity_type = 'node') {
$groups = $this->ogMembership->getUserGroupIds($this->user);
$groups = $this->ogMembership->getUserGroupIds($this->ogUser);
if (!empty($groups) && isset($groups[$entity_type])) {
return $groups[$entity_type];
}
Expand Down

0 comments on commit dc2724c

Please sign in to comment.