Loading modules/Auth/Helpers/auth_helper.php +2 −2 Original line number Diff line number Diff line Loading @@ -139,7 +139,7 @@ if (! function_exists('get_podcast_group')) { function get_podcast_group(User $user, int $podcastId, bool $removePrefix = true): ?string { $podcastGroups = array_filter($user->getGroups() ?? [], static function ($group) use ($podcastId): bool { return str_starts_with($group, "podcast#{$podcastId}"); return str_starts_with($group, "podcast#{$podcastId}-"); }); if ($podcastGroups === []) { Loading @@ -155,7 +155,7 @@ if (! function_exists('get_podcast_group')) { } if ($removePrefix) { // strip the `podcast#{id}.` prefix when returning group // strip the `podcast#{id}-` prefix when returning group return substr((string) $podcastGroup, strlen('podcast#' . $podcastId . '-')); } Loading modules/Auth/Models/UserModel.php +2 −2 Original line number Diff line number Diff line Loading @@ -35,7 +35,7 @@ class UserModel extends ShieldUserModel { return $this->select('users.*') ->join('auth_groups_users', 'users.id = auth_groups_users.user_id') ->like('auth_groups_users.group', "podcast#{$podcastId}") ->like('auth_groups_users.group', "podcast#{$podcastId}-") ->findAll(); } Loading @@ -44,7 +44,7 @@ class UserModel extends ShieldUserModel return $this->select('users.*') ->join('auth_groups_users', 'users.id = auth_groups_users.user_id') ->where('users.id', $contributorId) ->like('auth_groups_users.group', "podcast#{$podcastId}") ->like('auth_groups_users.group', "podcast#{$podcastId}-") ->first(); } } Loading
modules/Auth/Helpers/auth_helper.php +2 −2 Original line number Diff line number Diff line Loading @@ -139,7 +139,7 @@ if (! function_exists('get_podcast_group')) { function get_podcast_group(User $user, int $podcastId, bool $removePrefix = true): ?string { $podcastGroups = array_filter($user->getGroups() ?? [], static function ($group) use ($podcastId): bool { return str_starts_with($group, "podcast#{$podcastId}"); return str_starts_with($group, "podcast#{$podcastId}-"); }); if ($podcastGroups === []) { Loading @@ -155,7 +155,7 @@ if (! function_exists('get_podcast_group')) { } if ($removePrefix) { // strip the `podcast#{id}.` prefix when returning group // strip the `podcast#{id}-` prefix when returning group return substr((string) $podcastGroup, strlen('podcast#' . $podcastId . '-')); } Loading
modules/Auth/Models/UserModel.php +2 −2 Original line number Diff line number Diff line Loading @@ -35,7 +35,7 @@ class UserModel extends ShieldUserModel { return $this->select('users.*') ->join('auth_groups_users', 'users.id = auth_groups_users.user_id') ->like('auth_groups_users.group', "podcast#{$podcastId}") ->like('auth_groups_users.group', "podcast#{$podcastId}-") ->findAll(); } Loading @@ -44,7 +44,7 @@ class UserModel extends ShieldUserModel return $this->select('users.*') ->join('auth_groups_users', 'users.id = auth_groups_users.user_id') ->where('users.id', $contributorId) ->like('auth_groups_users.group', "podcast#{$podcastId}") ->like('auth_groups_users.group', "podcast#{$podcastId}-") ->first(); } }