Skip to content

Commit

Permalink
fix: missing idp
Browse files Browse the repository at this point in the history
  • Loading branch information
MahdiBaghbani committed Sep 6, 2023
1 parent 2aacd76 commit e815743
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Controller/RevaController.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ private function init($userId)
private function getDomainFromURL($url)
{
// converts https://revaowncloud1.docker/ to revaowncloud1.docker
// Note, DO not use it on anything whithout http(s) in the start, it would return null.
return str_ireplace("www.", "", parse_url($url, PHP_URL_HOST));
}

Expand Down Expand Up @@ -438,7 +439,7 @@ private function formatFederatedUser($username, $remote)
{
return [
"id" => [
"idp" => $this->getDomainFromURL($remote),
"idp" => $remote,
"opaque_id" => $username,
],
"display_name" => $username, // FIXME: this comes in the OCM share payload
Expand Down

0 comments on commit e815743

Please sign in to comment.