Skip to content

Commit

Permalink
fix parsing user id (052abac)
Browse files Browse the repository at this point in the history
  • Loading branch information
LinneyS committed Jul 21, 2020
1 parent 6eeadf5 commit 5a8a71b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions controller/callbackcontroller.php
Original file line number Diff line number Diff line change
Expand Up @@ -587,9 +587,14 @@ private function getShare($shareToken) {
*
* @return string
*/
private function parseUserId($uniqueUserId) {
private function parseUserId($userId) {
$instanceId = $this->config->GetSystemValue("instanceid", true);
$userId = ltrim($uniqueUserId, $instanceId . "_");
$instanceId = $instanceId . "_";

if (substr($userId, 0, strlen($instanceId)) === $instanceId) {
return substr($userId, strlen($instanceId));
}

return $userId;
}

Expand Down

0 comments on commit 5a8a71b

Please sign in to comment.