Skip to content

Commit

Permalink
Add search attribute to user interface
Browse files Browse the repository at this point in the history
  • Loading branch information
tomneedham committed May 12, 2017
1 parent 8e00ed3 commit 9d75572
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/private/Group/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ public function findUsersInGroup($gid, $search = '', $limit = -1, $offset = 0) {
foreach($groupUsers as $groupUser) {
$matchingUsers[$groupUser->getUID()] = $groupUser;
}
die(var_dump($matchingUsers));

return $matchingUsers;
}

Expand Down
1 change: 1 addition & 0 deletions lib/private/User/Account.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
* @method string getHome()
* @method void setHome(string $home)
* @method void setSearchAttributes(string $searchAttributes)
* @method string getSearchAttributes()
*
* @package OC\User
*/
Expand Down
13 changes: 13 additions & 0 deletions lib/private/User/RemoteUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,4 +197,17 @@ public function getQuota() {
public function setQuota($quota) {
}

/**
* @inheritdoc
*/
public function getSearchAttributes() {
return '';
}

/**
* @inheritdoc
*/
public function setSearchAttributes($searchString) {
}

}
16 changes: 16 additions & 0 deletions lib/private/User/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -433,4 +433,20 @@ public function triggerChange($feature, $value = null) {
$this->emitter->emit('\OC\User', 'changeUser', [$this, $feature, $value]);
}
}

/**
* @return string
* @since 10.0.1
*/
public function getSearchAttributes() {
return $this->account->getSearchAttributes();
}

/**
* @return string
* @since 10.0.1
*/
public function setSearchAttributes($searchString) {
$this->account->setSearchAttributes($searchString);
}
}
17 changes: 17 additions & 0 deletions lib/public/IUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,4 +200,21 @@ public function getQuota();
*/
public function setQuota($quota);

/**
* set the users' search attributes
*
* @param string $searchString
* @return void
* @since 10.0.1
*/
public function setSearchAttributes($searchString);

/**
* get the users' search attributes
*
* @return string
* @since 10.0.1
*/
public function getSearchAttributes();

}

0 comments on commit 9d75572

Please sign in to comment.