Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move from OC_User to UserSession #41964

Closed
wants to merge 1 commit into from
Closed

Conversation

solracsf
Copy link
Member

@solracsf solracsf commented Dec 1, 2023

Checklist

Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
@solracsf solracsf closed this Dec 1, 2023
@solracsf solracsf deleted the userToUserSession branch December 1, 2023 10:37
@@ -323,19 +323,23 @@
*
*/
public function pre_renameOrCopy_hook(Node $source, Node $target): void {
$user = $this->userSession->getUser()?->getUID();
if (!user) {

Check failure

Code scanning / Psalm

UndefinedConstant Error

Const user is not defined
// if we rename a movable mount point, then the versions don't have
// to be renamed
$oldPath = $this->getPathForNode($source);
$newPath = $this->getPathForNode($target);
$absOldPath = Filesystem::normalizePath('/' . \OC_User::getUser() . '/files' . $oldPath);
$absOldPath = Filesystem::normalizePath('/' . $user . '/files' . $oldPath);

Check notice

Code scanning / Psalm

PossiblyNullOperand Note

Cannot concatenate with a possibly null null|string
// if we rename a movable mount point, then the versions don't have
// to be renamed
$oldPath = $this->getPathForNode($source);
$newPath = $this->getPathForNode($target);
$absOldPath = Filesystem::normalizePath('/' . \OC_User::getUser() . '/files' . $oldPath);
$absOldPath = Filesystem::normalizePath('/' . $user . '/files' . $oldPath);

Check notice

Code scanning / Psalm

PossiblyNullOperand Note

Cannot concatenate with a possibly null null|string
return;
}

$view = new View(\OC_User::getUser() . '/files');
$view = new View($user . '/files');

Check notice

Code scanning / Psalm

PossiblyNullOperand Note

Cannot concatenate with a possibly null null|string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant