ext_localconf.php 2.37 KB
Newer Older
1 2 3 4 5
<?php
if (!defined('TYPO3_MODE')) {
    die('Access denied.');
}

6 7 8 9 10 11 12 13 14 15 16
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
    'T3o.' . $_EXTKEY,
    'Pi1',
    [
        'MyProfile' => 'show, edit, update',
    ],
    [
        'MyProfile' => 'edit, update',
    ]
);

17 18 19 20 21
/**
 * Register signal slots
 */
$dispatcher = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\SignalSlot\Dispatcher::class);
$dispatcher->connect(
22
    \In2code\Femanager\Controller\NewController::class,
23
    'createAdminConfirmationRequestAutoConfirmation',
24 25
    \T3o\T3omy\Hooks\FeManagerHooks::class,
    'newUserAutoApprovement'
26
);
27

28
$dispatcher->connect(
29
    \In2code\Femanager\Controller\NewController::class,
30
    'createAdminConfirmationRequestManualConfirmation',
31 32
    \T3o\T3omy\Hooks\FeManagerHooks::class,
    'newUserNotification'
33
);
34 35 36

$dispatcher->connect(
    \In2code\Femanager\Controller\UserBackendController::class,
37
    'confirmUserAction',
38 39 40
    \T3o\T3omy\Hooks\FeManagerHooks::class,
    'newUserAdminApprovement'
);
41

42 43
$dispatcher->connect(
    \In2code\Femanager\Controller\UserBackendController::class,
44
    'refuseUserAction',
45
    \T3o\T3omy\Hooks\FeManagerHooks::class,
46
    'newUserAdminDecline'
47
);
48

49 50 51 52 53 54 55
$dispatcher->connect(
    \In2code\Femanager\Controller\EditController::class,
    'updateActionBeforePersist',
    \T3o\T3omy\Hooks\FeManagerHooks::class,
    'selfUpdateOfUser'
);

56 57 58 59 60 61 62
$dispatcher->connect(
    \In2code\Femanager\Controller\NewController::class,
    'createActionBeforePersist',
    \T3o\T3omy\Hooks\FeManagerHooks::class,
    'preApprovementUserCreation'
);

63 64 65 66 67
/**
 * Register hooks
 */

// Hook to update Password in LDAP -> if password reset was fullfilled
68
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['felogin']['password_changed'][] = \T3o\T3omy\Hooks\FeManagerHooks::class . '->writePassword';
69

70
// Hook to process reactivate process via BE
71
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/class.db_list_extra.inc']['getTable'][] = \T3o\T3omy\Hooks\ReactivateUserHook::class;
72 73

call_user_func(
74
    function () {
75 76 77 78 79 80 81 82 83 84 85 86 87
        \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
            'T3o.T3omy',
            'Communitymembership',
            [
                'CommunityMembership' => 'determineMembership, update'
            ],
            // non-cacheable actions
            [
                'CommunityMembership' => 'determineMembership, update'
            ]
        );
    }
);