sgalinski / sg-account
sgalinski Account - Extends Website user functionalities.
Requires
- facebook/graph-sdk: ~5.0
- google/apiclient: ~2.12
- guzzlehttp/oauth-subscriber: ^0.4
- sgalinski/sg-ajax: >=5.0.0
- sgalinski/sg-consistence: >=6.0.0
- sgalinski/sg-mail: >=8.0.0
- thenetworg/oauth2-azure: ^2.2
- typo3/cms-backend: ^13.4.0
- typo3/cms-core: ^13.4.0
- typo3/cms-extbase: ^13.4.0
- typo3/cms-fluid: ^13.4.0
- typo3/cms-frontend: ^13.4.0
Suggests
- sgalinski/project-base: Allows to use the countries inside of the Fluid templates.
Replaces
- sgalinski/sg_account: 11.0.10
- dev-master
- 11.0.10
- 11.0.9
- 11.0.8
- 11.0.7
- 11.0.6
- 11.0.5
- 11.0.4
- 11.0.3
- 11.0.2
- 11.0.1
- 11.0.0
- v10.x-dev
- 10.3.14
- 10.3.13
- 10.3.12
- 10.3.11
- 10.3.10
- 10.3.9
- 10.3.8
- 10.3.7
- 10.3.6
- 10.3.5
- 10.3.4
- 10.3.3
- 10.3.2
- 10.3.1
- 10.3.0
- 10.2.0
- 10.1.10
- 10.1.9
- 10.1.8
- 10.1.7
- 10.1.6
- 10.1.5
- 10.1.4
- 10.1.3
- 10.1.2
- 10.1.1
- 10.1.0
- 10.0.0
- v9.x-dev
- 9.1.5
- 9.1.4
- 9.1.3
- 9.1.2
- 9.1.1
- 9.1.0
- 9.0.28
- 9.0.27
- 9.0.26
- 9.0.25
- 9.0.24
- 9.0.23
- 9.0.22
- 9.0.21
- 9.0.20
- 9.0.19
- 9.0.18
- 9.0.17
- 9.0.16
- 9.0.15
- 9.0.14
- 9.0.13
- 9.0.12
- 9.0.11
- 9.0.10
- 9.0.9
- 9.0.8
- 9.0.7
- 9.0.6
- 9.0.5
- 9.0.4
- 9.0.3
- 9.0.2
- 9.0.1
- 9.0.0
- v8.5.x-dev
- 8.5.7
- 8.5.6
- 8.5.5
- 8.5.4
- 8.5.3
- 8.5.2
- 8.5.1
- 8.5.0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10.0
- 5.9.5
- 5.9.4
- 5.9.3
- 5.9.2
- 5.9.1
- 5.9.0
- 5.8.0
- 5.7.7
- 5.7.6
- 5.7.5
- 5.7.4
- 5.7.3
- 5.7.2
- 5.7.1
- 5.7.0
- 5.6.5
- 5.6.4
- 5.6.3
- 5.6.2
- 5.6.1
- 5.6.0
- 5.5.9
- 5.5.8
- 5.5.7
- 5.5.6
- 5.5.5
- 5.5.4
- 5.5.3
- 5.5.2
- 5.5.1
- 5.5.0
- 5.4.0
- 5.3.3
- 5.3.2
- 5.3.1
- 5.3.0
- 5.2.6
- 5.2.5
- 5.2.4
- 5.2.3
- 5.1.3
- 5.1.2
- 5.1.1
- 5.1.0
- 5.0.4
- 5.0.3
- 5.0.2
- 5.0.1
- 5.0.0
- 4.3.3
- 4.3.2
- 4.3.1
- 4.3.0
- 4.2.2
- 4.2.1
- 4.2.0
- 4.1.2
- 4.1.1
- 4.1.0
- 4.0.7
- 4.0.6
- 4.0.5
- 4.0.4
- 4.0.3
- 4.0.2
- 4.0.1
- 4.0.0
- 3.3.8
- 3.3.7
- 3.3.6
- 3.3.5
- 3.3.4
- 3.3.3
- 3.3.2
- 3.3.1
- 3.3.0
- 3.2.0
- 3.1.8
- 3.1.7
- 3.1.6
- 3.1.5
- 3.1.4
- 3.1.3
- 3.1.2
- 3.1.1
- 3.1.0
- 3.0.4
- 3.0.3
- 3.0.2
- 3.0.1
- 3.0.0
- 2.2.13
- 2.2.12
- 2.2.11
- 2.2.10
- 2.2.9
- 2.2.8
- 2.2.7
- 2.2.6
- 2.2.5
- 2.2.4
- 2.2.3
- 2.2.2
- 2.2.1
- 2.2.0
- 2.1.0
- 2.0.3
- 2.0.2
- 2.0.1
- 2.0.0
This package is not auto-updated.
Last update: 2025-07-19 09:45:54 UTC
README
License: GNU GPL, Version 2
Repository: https://gitlab.sgalinski.de/typo3/sg_account
Please report bugs here: https://gitlab.sgalinski.de/typo3/sg_account
About
This extension provides various frontend user functionalities for a TYPO3 installation.
Features:
- Frontend User registration
- Double Opt-in registration
- Frontend User account overview
- Frontend User profile editing
- Avatar image upload
- Gravatar integration
- Frontend avatar image crop
- Multiple email addresses with double opt-in validation
- Frontend user login (with any email address saved for each user)
- Facebook account login
- Azure account login
- Google account login
- Auto login after Registration
- Password recovery
- FE user group mapping with OAuth login provider
- update FE user group for OAuth login on login/register
- Works with the TYPO3 password policies
- Random password generation with respect to the defined policies (for FE and BE users)
- FE 'Login As' feature for BE admin or editor
- Backend Module for FE user management
- Model Extensibility (with custom extension)
Integration
The TypoScript configuration ("SgAccount - Configuration") has to be included into your TypoScript template.
Add a new configuration for each site root with the FrontendUser backend module and adapt all settings of it. All the options are explained after the creation of the new configuration
Now you should create a new cron job within the scheduler backend module. This will check the consistence of the user data and prevent errors.
- Class: Extbase CommandController Task
- Type: Recurring
- Frequency: Once a day
- CommandController Command: SgConsistence CheckConsistence: checkConsistenceForDomainModel
After saving, you need to add arguments to the cron job. They will appear in the bottom.
- domainNamespace: SGalinski\SgAccount\Domain\
- domainModel: FrontendUser
Password Policies
The password policies can be configured just like any other TYPO3 password policy. Just add the policies for the
extension as sg_account
in your additional.php like this:
$GLOBALS['TYPO3_CONF_VARS']['SYS']['passwordPolicies'] = [
'sg_account' => [
'validators' => [
\SGalinski\SgAccount\PasswordPolicy\Validator\PasswordValidator::class => [
'options' => [
'minLength' => 10,
'minUppercaseLetters' => 1,
'minLowercaseLetters' => 1,
'minNumbers' => 1,
'minSpecialCharacters' => 0,
'acceptSpecialCharacters' => '!#$%&()*+,-./:;<=>?@[\]^_{|}~'
]
]
]
]
];
$GLOBALS['TYPO3_CONF_VARS']['FE']['passwordPolicy'] = 'sg_account';
Backend Module
The Backend module is found in the WEB section under the name Frontend Users
You can create a new frontend user by clicking on
the
New Website User button.
Edit
Disable/Enable
Delete
Show further information
Show history
Create a new user on this page
.... Expand/Collapse the options menu
Login with this user
Automated Email Messages
The extension uses sg_mail to configure email templates for the following email messages:
register_admin - sent to the specified Administrator address(es) after a new user registration.
register_user - sent to the registered user's address after registration or after email confirmation
if 'enableEmailConfirmation' is set.
confirm_user - sent to the registered user's address after registration if 'enableEmailConfirmation' is set.
It contains the email confirmation link.
confirm_email - sent if 'enableEmailConfirmation' is set, to an unconfirmed email address after a login atempt or
if the user edits his email addresses. It contains the email confirmation link.
notify_admin - sent to the Administrator if a user record is pending removal for inactivity.
notify_user - sent to a user if his/her account is pending removal for inactivity.
deactivate_admin - sent to the Administrator if a user record was removed for inactivity.
deactivate_user - sent to a user if his/her account was removed for inactivity.
For more information about registering and configuring email templates please refer to the sg_mail documentation.
Rendering a profile image
sg_account comes with a viewhelper, that enables you to display a frontend users profile image inside a fluid template.
It takes the following arguments:
- userUid: the uid of the user
- width: the width of the image
- height: the height of the image
- defaultImageUri: path to a fallback/default image if no user profile image is set
Example usage:
{namespace sgAccount=SGalinski\sgAccount\ViewHelpers}
<sgAccount:getProfileImage userUid="100" width="20" height="20"/>
Redirect to the login for protected pages
Set up an error handler for HTTP code 403 that renders the login page. That's all!
Redirect to a page after login
If you set a link to a protected page, the user will be redirected to the login form if not currently logged in. By providing a URL via the redirect parameter, you can control the page the user will be redirected to after a successful login. It might be possible to adjust the redirect priority in order for the query parameter to work!
See the following examples where you want to redirect to `
https://foobar.com/protected```.
From a link
Link to the login page with the escaped redirect URL as a querystring param.
Hint: if you generate the link via JavaScript, use the decodeURIComponent() function to escape the URL in the query string.
<a href="https://foobar.com/login?redirect=https%3A//foobar.com/protected">Login</a>
From inside the login form
See the following examples where you want to redirect to `
https://foobar.com/protected```.
From a link
Link to the login page with the escaped redirect URL as a querystring param.
Hint: if you generate the link via JavaScript, use the decodeURIComponent() function to escape the URL in the query string.
<a href="https://foobar.com/login?redirect=https%3A//foobar.com/protected">Login</a>
From inside the login form
Include the following hidden input (or set the value if it's already included).
Note that the value has to contain the pathname and not the full URI.
<input type="hidden" name="redirect" value="/protected">
Event List
- AfterCreateRedirectEvent : The PSR-14 event \SGalinski\SgAccount\Event\AfterCreateRedirectEvent is fired after a
redirect in create action is created.
API:
getUser()
: get the current user DTO- returns: \SGalinski\SgAccount\AccountConfiguration\FrontendUser\AbstractFrontendUserDTO
getRequest()
: get the current request- returns: \TYPO3\CMS\Extbase\Mvc\Request
getUriBuilder()
: get the Extbase UriBuilder- returns: \TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder
- AfterLoginEvent : The PSR-14 event \SGalinski\SgAccount\Event\AfterLoginEvent is fired upon login and before
the redirect.
API:
getUser()
: get the current user DTO- returns: \SGalinski\SgAccount\AccountConfiguration\FrontendUser\AbstractFrontendUserDTO
getConfiguration()
: get the current configuration- returns: \SGalinski\SgAccount\AccountConfiguration\AbstractConfiguration
getRedirectUrl()
: get the redirect uri- returns: string
setRedirectUrl(string $redirectUrl)
: set the redirect uri- param $redirectUrl: the redirect uri to set
- returns: void
getFlashMessages()
: get the flash messages- returns: \TYPO3\CMS\Extbase\Persistence\ObjectStorage
setFlashMessages(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $flashMessages)
: set the flash messages- param $flashMessages: the flash messages to set
- returns: \TYPO3\CMS\Extbase\Persistence\ObjectStorage
hasFlashMessages()
: checks whether there are any flash messages exists- returns: bool
- AfterResetPasswordEvent : The PSR-14 event \SGalinski\SgAccount\Event\AfterResetPasswordEvent is fired upon
updating user password.
API:
getUser()
: get the current user DTO- returns: \SGalinski\SgAccount\AccountConfiguration\FrontendUser\AbstractFrontendUserDTO
getSettings()
: get the current settings- returns: array
getRedirectUrl()
: get the redirect uri- returns: string
setRedirectUrl(string $redirectUrl)
: set the redirect uri- param $redirectUrl: the redirect uri to set
- returns: void
- AfterWriteAndConsistDTOEvent : The PSR-14 event \SGalinski\SgAccount\Event\AfterWriteAndConsistDTOEvent is fired
upon updating the given user data and before redirect.
API:
getUser()
: get the current user DTO- returns: \SGalinski\SgAccount\AccountConfiguration\FrontendUser\AbstractFrontendUserDTO
getSettings()
: get the current settings- returns: array
getRedirectUrl()
: get the redirect uri- returns: string
setRedirectUrl(string $redirectUrl)
: set the redirect uri- param $redirectUrl: the redirect uri to set
- returns: void
getFlashMessages()
: get the flash messages- returns: \TYPO3\CMS\Extbase\Persistence\ObjectStorage
setFlashMessages(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $flashMessages)
: set the flash messages- param $flashMessages: the flash messages to set
- returns: \TYPO3\CMS\Extbase\Persistence\ObjectStorage
hasFlashMessages()
: checks whether there are any flash messages exists- returns: bool
- BeforeConfirmUserEmailEvent : The PSR-14 event \SGalinski\SgAccount\Event\BeforeConfirmUserEmailEvent is fired
before confirming the email address of the given user.
API:
getUser()
: get the current user DTO- returns: \SGalinski\SgAccount\AccountConfiguration\FrontendUser\AbstractFrontendUserDTO
getService()
: get the frontend user service- returns: \SGalinski\SgAccount\Domain\Service\FrontendUserService
- BeforeCreateUserEvent : The PSR-14 event \SGalinski\SgAccount\Event\BeforeCreateUserEvent is fired
before creating the given user.
API:
getUser()
: get the current user DTO- returns: \SGalinski\SgAccount\AccountConfiguration\FrontendUser\AbstractFrontendUserDTO
setUser(\SGalinski\SgAccount\AccountConfiguration\FrontendUser\AbstractFrontendUserDTO $user)
: set the user DTO- param $user: the current user DTO to set
- returns: void
- BeforeRenderEditFormEvent : The PSR-14 event \SGalinski\SgAccount\Event\BeforeRenderEditFormEvent is fired
before rendering the edit user form.
API:
getUser()
: get the current user DTO- returns: \SGalinski\SgAccount\AccountConfiguration\FrontendUser\AbstractFrontendUserDTO
setUser(\SGalinski\SgAccount\AccountConfiguration\FrontendUser\AbstractFrontendUserDTO $user)
: set the user DTO- param $user: the current user DTO to set
- returns: void
getView()
: get the edit action view interface- returns: \TYPO3Fluid\Fluid\View\ViewInterface
viewAssign(string $name, mixed $var)
: assign variables to the view- param $name: the name of variable in the view
- param $user: the value of variable in the view
- returns: void
getAll(s)
: get all Variables to be returned- returns: array
- BeforeRenderNewFormEvent : The PSR-14 event \SGalinski\SgAccount\Event\BeforeRenderNewFormEvent is fired
before rendering the register form.
API:
getUser()
: get the current user DTO- returns: \SGalinski\SgAccount\AccountConfiguration\FrontendUser\AbstractFrontendUserDTO
setUser(\SGalinski\SgAccount\AccountConfiguration\FrontendUser\AbstractFrontendUserDTO $user)
: set the user DTO- param $user: the current user DTO to set
- returns: void
getView()
: get the register action view interface- returns: \TYPO3Fluid\Fluid\View\ViewInterface
viewAssign(string $name, mixed $var)
: assign variables to the view- param $name: the name of variable in the view
- param $user: the value of variable in the view
- returns: void
getAll(s)
: get all Variables to be returned- returns: array
- BeforeRenderPasswordForgotEvent : The PSR-14 event \SGalinski\SgAccount\Event\BeforeRenderPasswordForgotEvent is
fired
before rendering the forget password form.
API:
getView()
: get the forget password action view interface- returns: \TYPO3Fluid\Fluid\View\ViewInterface
getSettings()
: get the current settings- returns: array
- BeforeRenderResetPasswordEvent : The PSR-14 event \SGalinski\SgAccount\Event\BeforeRenderResetPasswordEvent is
fired
before rendering the reset password form.
API:
getUser()
: get the current user DTO- returns: \SGalinski\SgAccount\AccountConfiguration\FrontendUser\AbstractFrontendUserDTO
getView()
: get the forget password action view interface- returns: \TYPO3Fluid\Fluid\View\ViewInterface
getSettings()
: get the current settings- returns: array
- BeforeRenderShowLoginEvent : The PSR-14 event \SGalinski\SgAccount\Event\BeforeRenderShowLoginEvent is fired
before rendering the login form.
API:
getView()
: get the forget password action view interface- returns: \TYPO3Fluid\Fluid\View\ViewInterface
getSettings()
: get the current settings- returns: array
- BeforeResetPasswordEvent : The PSR-14 event \SGalinski\SgAccount\Event\BeforeResetPasswordEvent is fired before
resetting the password for the given user.
API:
getView()
: get the forget password action view interface- returns: \TYPO3Fluid\Fluid\View\ViewInterface
getSettings()
: get the current settings- returns: array
- BeforeSaveUserEvent : The PSR-14 event \SGalinski\SgAccount\Event\BeforeSaveUserEvent is fired before saving the
data the given user.
API:
getUser()
: get the current user DTO- returns: \SGalinski\SgAccount\AccountConfiguration\FrontendUser\AbstractFrontendUserDTO
setUser(\SGalinski\SgAccount\AccountConfiguration\FrontendUser\AbstractFrontendUserDTO $user)
: set the user DTO- param $user: the current user DTO to set
- returns: void
- BeforeSendCreateUserMailsEvent : The PSR-14 event \SGalinski\SgAccount\Event\BeforeSaveUserEvent is fired before
sending an email for the newly created user
API:
getUser()
: get the current user DTO- returns: \SGalinski\SgAccount\AccountConfiguration\FrontendUser\AbstractFrontendUserDTO
setUser(\SGalinski\SgAccount\AccountConfiguration\FrontendUser\AbstractFrontendUserDTO $user)
: set the user DTO- param $user: the current user DTO to set
- returns: void
- BeforeWriteAndConsistDTOEvent : The PSR-14 event \SGalinski\SgAccount\Event\BeforeSaveUserEvent is fired before
updating the given user data and before redirect.
API:
getUser()
: get the current user DTO- returns: \SGalinski\SgAccount\AccountConfiguration\FrontendUser\AbstractFrontendUserDTO