Project

General

Profile

Actions

Bug #58519

closed

The SysAction\ActionTask::saveNewBackendUser is not adapted to FAL compatibles userHomePath

Added by Marc Bastian Heinrichs almost 10 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
File Abstraction Layer (FAL)
Target version:
-
Start date:
2014-05-05
Due date:
% Done:

70%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

see function action_createDir and action_getUserMainDir

Actions #1

Updated by Ingo Schmitt over 9 years ago

  • Category set to File Abstraction Layer (FAL)
Actions #2

Updated by Teamgeist Medien about 9 years ago

I've created a little workaround for this problem which works without the action_getUserMainDir.

I've changed action_createDir in \sysext\sys_action\Classes\ActionTask.php to the following:

protected function action_createDir($uid) {
        // Get path
        $path = $GLOBALS['TYPO3_CONF_VARS']['BE']['userHomePath'];

        // Get the uid
        $storageUidPos = strpos($path,':');
        $storageUid = substr($path,0,$storageUidPos);

        // Create an storage repo instance
        $storageRespository = GeneralUtility::makeInstance('\TYPO3\CMS\Core\Resource\StorageRepository');

        // get the storage by uid
        $storage = $storageRespository->findByUid($storageUid);

        // get the userHomePath in the storage
        $folder = $storage->getFolder('/'.substr($path,$storageUidPos+1));

        // create a new one
        $folder->createFolder($uid);
    }

Everything missing now are some checks if the path and the storage uid are set and of course if the storage and user home path does exist. I would like to add those checks but I'm to stupid to debug it :-x so please someone else add some if conditions like in the original action_getUserMainDir() including the "lockRootPath"-check.

Thanks!

Actions #3

Updated by Teamgeist Medien about 9 years ago

  • Assignee set to Helmut Hummel
  • % Done changed from 0 to 70
Actions #4

Updated by Helmut Hummel almost 9 years ago

  • Assignee deleted (Helmut Hummel)
Actions #5

Updated by Mathias Schreiber over 8 years ago

  • Target version deleted (next-patchlevel)
Actions #6

Updated by Benni Mack about 4 years ago

  • Status changed from New to Closed

This extension has been moved to another Git Repository - please open a ticket there: https://github.com/FriendsOfTYPO3/sys_action

Actions

Also available in: Atom PDF