PHPackages                             roadiz/abstract-user-theme - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. roadiz/abstract-user-theme

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

roadiz/abstract-user-theme
==========================

Abstract User space middleware for your Roadiz theme.

1.5.0(4y ago)0256MITPHPPHP &gt;=7.4

Since Jun 20Pushed 3y ago4 watchersCompare

[ Source](https://github.com/roadiz/AbstractUserTheme)[ Packagist](https://packagist.org/packages/roadiz/abstract-user-theme)[ RSS](/packages/roadiz-abstract-user-theme/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (7)Versions (12)Used By (0)

Abstract User theme
===================

[](#abstract-user-theme)

[![Build Status](https://camo.githubusercontent.com/2e1b37fafb5ac1c33ea6d1a31d880a773931f7375496af24ff1e3e566a657ca5/68747470733a2f2f7472617669732d63692e6f72672f726f6164697a2f4162737472616374557365725468656d652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/roadiz/AbstractUserTheme)

**Middleware theme for creating public User accounts and user actions.**

Features
--------

[](#features)

- Sign-up (configurable with `user_theme.allow_sign_up` boolean service)
- Sign-in
- Sign-in with OpenID (since Roadiz v1.5)
- Account validation by email
- Account validation by SMS (requires MessageBird API access-token)
- Password change
- *Forgot my password* (password change with a token sent to user email)
- GDPR compliance
    - User deletion
    - User data download (JSON serialization)

Usage
-----

[](#usage)

- Register AbstractUserTheme services

```
# app/AppKernel.php

/**
 * {@inheritdoc}
 */
public function register(\Pimple\Container $container)
{
    parent::register($container);

    /*
     * Add your own service providers.
     */
    $container->register(new \Themes\AbstractUserTheme\Services\AbstractUserThemeProvider());
}
```

- Extends your own theme with `AbstractUserTheme`

```
# themes/MyAwesomeTheme/MyAwesomeThemeApp.php
namespace Themes\MyAwesomeTheme;

use Themes\AbstractUserTheme\AbstractUserThemeApp;

/**
 * MyAwesomeThemeApp class
 */
class MyAwesomeThemeApp extends AbstractUserThemeApp {

}
```

- **Do not** directly register `AbstractUserTheme` in your `app/conf/config.yml` file, all services will be wired up using inheritance.
- Add a `additional_scripts` Twig block in your main theme template to be able to inject some JS dependencies.
- Import AbstractUserTheme routes into your theme’s (if you do not want to override them all)

```
# Resources/routes.yml
abstract_user_theme_routes:
    resource: abstract_routes.yml
```

Override
--------

[](#override)

### Override controller and their methods

[](#override-controller-and-their-methods)

All controllers are just empty classes using `Traits` so you can easily override them by recreating you route and controller inside your own theme.

```
