PHPackages                             rkw/rkw-registration - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. rkw/rkw-registration

Abandoned → [madj2k/t3-fe-register](/?search=madj2k%2Ft3-fe-register)Typo3-cms-extension[Authentication &amp; Authorization](/categories/authentication)

rkw/rkw-registration
====================

Extension for registration of FE-Users and FE-Usergroups

v9.5.1-stable(3y ago)030314GPL-2.0+PHPPHP &gt;=7.4

Since Nov 28Pushed 3y ago1 watchersCompare

[ Source](https://github.com/RKWKomZe/RkwRegistration)[ Packagist](https://packagist.org/packages/rkw/rkw-registration)[ Docs](https://www.rkw-kompetenzzentrum.de)[ RSS](/packages/rkw-rkw-registration/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (6)Versions (62)Used By (4)

Usage in your own extension
===========================

[](#usage-in-your-own-extension)

Opt-In
------

[](#opt-in)

### 1. Generate Opt-In in your controller

[](#1-generate-opt-in-in-your-controller)

For a registration with opt-in simple use the example-code below in your controller. Please ensure to always load FrontendUserRegistration via ObjectManager

```
/** @var \RKW\RkwRegistration\Domain\Model\FrontendUser $frontendUser */
$frontendUser = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(FrontendUser::class);
$frontendUser->setEmail($email);

/** @var \RKW\RkwRegistration\Registration\FrontendUserRegistration $registration */
$objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(ObjectManager::class);
$registration = $objectManager->get(FrontendUserRegistration::class);
$registration->setFrontendUser($frontendUser)
    ->setData($alert)
    ->setCategory('rkwAlerts')
    ->setRequest($request)
    ->startRegistration();

```

If you want to be able to update the data of the frontendUser after the successful opt-in you can use the method **setFrontendUserUpdate**. This will update the frontendUser-object as soon as the user accepts the opt-in. This way you can be sure that changes to the frontendUser-object only happen if authorized.

### 2. Define MailService for Opt-In-Mail

[](#2-define-mailservice-for-opt-in-mail)

No you need a MailService class with a defined action for Opt-Ins

```
/**
* Handles opt-in event
*
* @param \RKW\RkwRegistration\Domain\Model\FrontendUser $frontendUser
* @param \RKW\RkwRegistration\Domain\Model\OptIn $optIn
* @return void
* @throws \RKW\RkwMailer\Exception
* @throws \TYPO3\CMS\Extbase\Persistence\Exception\UnknownObjectException
* @throws \TYPO3\CMS\Extbase\Persistence\Exception\IllegalObjectTypeException
* @throws \TYPO3Fluid\Fluid\View\Exception\InvalidTemplateResourceException
* @throws \TYPO3\CMS\Extbase\Configuration\Exception\InvalidConfigurationTypeException
*/
public function optIn (
    \RKW\RkwRegistration\Domain\Model\FrontendUser $frontendUser,
    \RKW\RkwRegistration\Domain\Model\OptIn $optIn
): void  {

    // get settings
    $settings = $this->getSettings(ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
    $settingsDefault = $this->getSettings();

    if ($settings['view']['templateRootPaths']) {

        /** @var \RKW\RkwMailer\Service\MailService $mailService */
        $mailService = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(MailService::class);

        // send new user an email with token
        $mailService->setTo($frontendUser, array(
            'marker' => array(
                'frontendUser' => $frontendUser,
                'optIn'        => $optIn,
                'pageUid'      => intval($GLOBALS['TSFE']->id),
                'loginPid'     => intval($settingsDefault['loginPid']),
            ),
        ));

        $mailService->getQueueMail()->setSubject(
            FrontendLocalizationUtility::translate(
                'rkwMailService.optInAlertUser.subject',
                'rkw_alerts',
                null,
                $frontendUser->getTxRkwregistrationLanguageKey()
            )
        );

        $mailService->getQueueMail()->addTemplatePaths($settings['view']['templateRootPaths']);
        $mailService->getQueueMail()->addPartialPaths($settings['view']['partialRootPaths']);

        $mailService->getQueueMail()->setPlaintextTemplate('Email/OptInAlertUser');
        $mailService->getQueueMail()->setHtmlTemplate('Email/OptInAlertUser');
        $mailService->send();
    }
}

```

### 3. Set Signal-Slot

[](#3-set-signal-slot)

Now we need a signal-slot that refers to the defined method for sending mails (ext\_localconf.php)

```
/**
 * @var \TYPO3\CMS\Extbase\SignalSlot\Dispatcher $signalSlotDispatcher
 */
$signalSlotDispatcher = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(TYPO3\CMS\Extbase\SignalSlot\Dispatcher::class);
$signalSlotDispatcher->connect(
    RKW\RkwRegistration\Registration\AbstractRegistration::class,
    RKW\RkwRegistration\Registration\AbstractRegistration::SIGNAL_AFTER_CREATING_OPTIN  . 'RkwAlerts',
    RKW\RkwAlerts\Service\RkwMailService::class,
    'optInAlertUser'
);

```

### 4. Set Template for Opt-In-Mail

[](#4-set-template-for-opt-in-mail)

The opt-in-email may look like this:

```

	    :\n
	    \n\n

        :\n

```

### 5. Check Opt-In

[](#5-check-opt-in)

To check the opt-in you can use the following example-code in your contoller:

```
public function optInAction(string $tokenUser, string $token): void
{
    /** @var \RKW\RkwRegistration\Registration\FrontendUserRegistration $registration */
    $registration = $this->objectManager->get(FrontendUserRegistration::class);
    $result = $registration->setFrontendUserToken($tokenUser)
        ->setCategory('rkwAlerts')
        ->setRequest($this->request)
        ->validateOptIn($token);

    if ($result >= 200 && $result < 300) {

        // sucessfull

    } elseif ($result >= 300 && $result < 400) {

        // canceled

    } else {
        // error / not found
    }
}

```

### 6. Signal-Slot for extension specific action after opt-in

[](#6-signal-slot-for-extension-specific-action-after-opt-in)

We need a second signal-slot in order to do whatever we need to do after the opt-in

```
    $signalSlotDispatcher->connect(
        RKW\RkwRegistration\Registration\AbstractRegistration::class,
        \RKW\RkwRegistration\Registration\AbstractRegistration::SIGNAL_AFTER_REGISTRATION_COMPLETED . 'RkwAlerts',
        'RKW\\RkwAlerts\\Alerts\\AlertManager',
        'saveAlertByRegistration'
    );

```

### 7. Method for for the specific action

[](#7-method-for-for-the-specific-action)

Then we need to define the corresponding method:

```
    /**
     * Save alert by registration
     * Used by SignalSlot
     *
     * @param \RKW\RkwRegistration\Domain\Model\FrontendUser $frontendUser
     * @param \RKW\RkwRegistration\Domain\Model\OptIn $optIn
     * @return void
     * @api Used by SignalSlot
     */
    public function saveAlertByRegistration(
        \RKW\RkwRegistration\Domain\Model\FrontendUser $frontendUser,
        \RKW\RkwRegistration\Domain\Model\OptIn $optIn
    ) {

        if (
            ($alert = $optIn->getData())
            && ($alert instanceof \RKW\RkwAlerts\Domain\Model\Alert)
        ) {

            try {
                // create alert here
            } catch (\RKW\RkwAlerts\Exception $exception) {
                // do nothing here
            }
        }
    }

```

Another use-cases
-----------------

[](#another-use-cases)

- You can also: \*\* Send a confirmation-email after the opt-in was successful (Using SIGNAL\_AFTER\_ALERT\_CREATED-Signal-Slot) \*\* Delete all extension-specific data if the frontendUser is deleted (Using SIGNAL\_AFTER\_REGISTRATION\_ENDED-Signal-Slot) \*\* ... do many other fancy stuff ;-)

Consent (Privacy, Terms, Marketing)
===================================

[](#consent-privacy-terms-marketing)

The extension has a ViewHelper and validators to obtain consent to privacy, terms of use and advanced marketing. In order to obtain the consents, only the corresponding ViewHelper must be used in the own extension. As soon as an opt-in is carried out, the corresponding consents are automatically documented and stored in the database. The consents granted are recorded accordingly with the associated data (IP address, browser, etc.). In addition, the consent to the terms of use and to marketing is stored in the FrontendUser, as these consents are usually page-wide and independent of the respective context of the consent.

1. In Fluid
-----------

[](#1-in-fluid)

The following code can be used to obtain the appropriate consent. It is important that the ViewHelper is used within a form and that the FormErrors are also returned via Fluid.

```

        [...]

        [...]

```

2. In the controller
--------------------

[](#2-in-the-controller)

Only the corresponding validators are included here. They always refer to the form object.

```
    /**
     * action create
     *
     * @param \RKW\RkwAlerts\Domain\Model\Alert $alert
     * @param string $email
     * @return void
     * @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
     * @throws \TYPO3\CMS\Extbase\Mvc\Exception\UnsupportedRequestTypeException
     * @TYPO3\CMS\Extbase\Annotation\Validate("\RKW\RkwRegistration\Validation\Consent\TermsValidator", param="alert")
     * @TYPO3\CMS\Extbase\Annotation\Validate("\RKW\RkwRegistration\Validation\Consent\PrivacyValidator", param="alert")
     * @TYPO3\CMS\Extbase\Annotation\Validate("\RKW\RkwRegistration\Validation\Consent\MarketingValidator", param="alert")
     */
    public function createAction(
        \RKW\RkwAlerts\Domain\Model\Alert $alert,
        string $email = ''
    ): void {

        [...]

```

An opt-in procedure is usually not carried out for logged-in frontend users. If you still want to record the time of consent for a registration, you can achieve this with the following code:

```
    \RKW\RkwRegistration\DataProtection\ConsentHandler::add(
        $request,
        $frontendUser,
        $alert,
        'new alert'
    );

```

Upgrade to v9.5
===============

[](#upgrade-to-v95)

Update Database
---------------

[](#update-database)

```
RENAME TABLE `tx_rkwregistration_domain_model_privacy` TO `tx_rkwregistration_domain_model_consent`;
ALTER TABLE `tx_rkwregistration_domain_model_consent` CHANGE `registration_user_sha1` `frontend_user_token` VARCHAR(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '';
ALTER TABLE `tx_rkwregistration_domain_model_consent` ADD `consent_privacy` INT DEFAULT 0 NOT NULL;
ALTER TABLE `tx_rkwregistration_domain_model_consent` ADD `consent_terms` INT DEFAULT 0 NOT NULL;
ALTER TABLE `tx_rkwregistration_domain_model_consent` ADD `consent_marketing` INT DEFAULT 0 NOT NULL;
UPDATE `tx_rkwregistration_domain_model_consent` SET `consent_privacy` = 1;

```

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity75

Established project with proven stability

 Bus Factor1

Top contributor holds 56.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~33 days

Recently: every ~91 days

Total

48

Last Release

1173d ago

Major Versions

v7.6.14 → v8.7.0-beta2019-02-27

v8.7.41-beta → v9.5.0-stable2022-11-16

PHP version history (2 changes)v8.7.0-betaPHP &gt;=5.6

v9.5.0-stablePHP &gt;=7.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/ca11ace9490b8fe0b145e7d32464fba5c8eddaa88d700b95d32241a226623e76?d=identicon)[SteffenKroggel](/maintainers/SteffenKroggel)

---

Top Contributors

[![skroggel](https://avatars.githubusercontent.com/u/8121847?v=4)](https://github.com/skroggel "skroggel (161 commits)")[![MaxFaessler](https://avatars.githubusercontent.com/u/45080955?v=4)](https://github.com/MaxFaessler "MaxFaessler (83 commits)")[![addorange](https://avatars.githubusercontent.com/u/1980618?v=4)](https://github.com/addorange "addorange (38 commits)")[![Melanie2508](https://avatars.githubusercontent.com/u/78857863?v=4)](https://github.com/Melanie2508 "Melanie2508 (2 commits)")

---

Tags

loginregistrationTYPO3 CMSregisteruser-groupsRKWFrontend Users

### Embed Badge

![Health badge](/badges/rkw-rkw-registration/health.svg)

```
[![Health](https://phpackages.com/badges/rkw-rkw-registration/health.svg)](https://phpackages.com/packages/rkw-rkw-registration)
```

###  Alternatives

[in2code/femanager

Modern TYPO3 Frontend User Registration.

49745.4k6](/packages/in2code-femanager)[sandstorm/usermanagement

Neos and Flow package for user management, login/logout, password reset and user activation

3828.4k](/packages/sandstorm-usermanagement)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
