Commit b87017b4 authored by Tino Goratsch's avatar Tino Goratsch

- introduced the UsersModel to the users module

- ToDo: Rename the UserModel class to something better
parent 97801c8e
......@@ -17,10 +17,6 @@ use ACP3\Modules\ACP3\Users;
*/
class Create extends AbstractFormAction
{
/**
* @var \ACP3\Core\Date
*/
protected $date;
/**
* @var \ACP3\Core\Helpers\Secure
*/
......@@ -29,10 +25,6 @@ class Create extends AbstractFormAction
* @var \ACP3\Core\Helpers\FormToken
*/
protected $formTokenHelper;
/**
* @var \ACP3\Modules\ACP3\Users\Model\Repository\UserRepository
*/
protected $userRepository;
/**
* @var \ACP3\Modules\ACP3\Users\Validation\AdminFormValidation
*/
......@@ -41,37 +33,38 @@ class Create extends AbstractFormAction
* @var \ACP3\Modules\ACP3\Permissions\Helpers
*/
protected $permissionsHelpers;
/**
* @var Users\Model\UsersModel
*/
protected $usersModel;
/**
* Create constructor.
*
* @param \ACP3\Core\Controller\Context\AdminContext $context
* @param \ACP3\Core\Date $date
* @param \ACP3\Core\Helpers\FormToken $formTokenHelper
* @param \ACP3\Core\Helpers\Secure $secureHelper
* @param \ACP3\Core\Helpers\Forms $formsHelpers
* @param \ACP3\Modules\ACP3\Users\Model\Repository\UserRepository $userRepository
* @param \ACP3\Core\Controller\Context\AdminContext $context
* @param \ACP3\Core\Helpers\FormToken $formTokenHelper
* @param \ACP3\Core\Helpers\Secure $secureHelper
* @param \ACP3\Core\Helpers\Forms $formsHelpers
* @param Users\Model\UsersModel $usersModel
* @param \ACP3\Modules\ACP3\Users\Validation\AdminFormValidation $adminFormValidation
* @param \ACP3\Modules\ACP3\Permissions\Helpers $permissionsHelpers
* @param \ACP3\Modules\ACP3\Permissions\Helpers $permissionsHelpers
*/
public function __construct(
Core\Controller\Context\AdminContext $context,
Core\Date $date,
Core\Helpers\FormToken $formTokenHelper,
Core\Helpers\Secure $secureHelper,
Core\Helpers\Forms $formsHelpers,
Users\Model\Repository\UserRepository $userRepository,
Users\Model\UsersModel $usersModel,
Users\Validation\AdminFormValidation $adminFormValidation,
Permissions\Helpers $permissionsHelpers)
{
parent::__construct($context, $formsHelpers);
$this->date = $date;
$this->formTokenHelper = $formTokenHelper;
$this->secureHelper = $secureHelper;
$this->userRepository = $userRepository;
$this->adminFormValidation = $adminFormValidation;
$this->permissionsHelpers = $permissionsHelpers;
$this->usersModel = $usersModel;
}
/**
......@@ -128,42 +121,17 @@ class Create extends AbstractFormAction
$salt = $this->secureHelper->salt(Users\Model\UserModel::SALT_LENGTH);
$insertValues = [
'id' => '',
'super_user' => (int)$formData['super_user'],
'nickname' => $this->secureHelper->strEncode($formData['nickname']),
$formData = array_merge($formData, [
'pwd' => $this->secureHelper->generateSaltedPassword($salt, $formData['pwd'], 'sha512'),
'pwd_salt' => $salt,
'realname' => $this->secureHelper->strEncode($formData['realname']),
'gender' => (int)$formData['gender'],
'birthday' => $formData['birthday'],
'birthday_display' => (int)$formData['birthday_display'],
'mail' => $formData['mail'],
'mail_display' => isset($formData['mail_display']) ? 1 : 0,
'website' => $this->secureHelper->strEncode($formData['website']),
'icq' => $formData['icq'],
'skype' => $this->secureHelper->strEncode($formData['skype']),
'street' => $this->secureHelper->strEncode($formData['street']),
'house_number' => $this->secureHelper->strEncode($formData['house_number']),
'zip' => $this->secureHelper->strEncode($formData['zip']),
'city' => $this->secureHelper->strEncode($formData['city']),
'address_display' => isset($formData['address_display']) ? 1 : 0,
'country' => $this->secureHelper->strEncode($formData['country']),
'country_display' => isset($formData['country_display']) ? 1 : 0,
'date_format_long' => $this->secureHelper->strEncode($formData['date_format_long']),
'date_format_short' => $this->secureHelper->strEncode($formData['date_format_short']),
'time_zone' => $formData['date_time_zone'],
'language' => $formData['language'],
'entries' => (int)$formData['entries'],
'registration_date' => $this->date->getCurrentDateTime(),
];
'registration_date' => 'now',
]);
$lastId = $this->userRepository->insert($insertValues);
$lastId = $this->usersModel->save($formData);
$this->permissionsHelpers->updateUserRoles($formData['roles'], $lastId);
Core\Cache\Purge::doPurge($this->appPath->getCacheDir() . 'http');
return $lastId;
});
}
......
......@@ -15,10 +15,6 @@ use ACP3\Modules\ACP3\Users;
*/
class Delete extends Core\Controller\AbstractAdminAction
{
/**
* @var Users\Model\AuthenticationModel
*/
protected $authenticationModel;
/**
* @var \ACP3\Modules\ACP3\Users\Model\Repository\UserRepository
*/
......@@ -28,18 +24,15 @@ class Delete extends Core\Controller\AbstractAdminAction
* Delete constructor.
*
* @param \ACP3\Core\Controller\Context\AdminContext $context
* @param Users\Model\AuthenticationModel $authenticationModel
* @param \ACP3\Modules\ACP3\Users\Model\Repository\UserRepository $userRepository
* @param Users\Model\UsersModel $usersModel
*/
public function __construct(
Core\Controller\Context\AdminContext $context,
Users\Model\AuthenticationModel $authenticationModel,
Users\Model\Repository\UserRepository $userRepository
Users\Model\UsersModel $usersModel
) {
parent::__construct($context);
$this->authenticationModel = $authenticationModel;
$this->userRepository = $userRepository;
$this->usersModel = $usersModel;
}
/**
......@@ -51,37 +44,21 @@ class Delete extends Core\Controller\AbstractAdminAction
public function execute($action = '')
{
return $this->actionHelper->handleCustomDeleteAction(
$action, function (array $items) {
$bool = $isAdminUser = $selfDelete = false;
foreach ($items as $item) {
$user = $this->user->getUserInfo($item);
if ($user['super_user'] == 1) {
$isAdminUser = true;
continue;
}
if ($item == $this->user->getUserId()) {
$this->authenticationModel->logout();
$selfDelete = true;
$action,
function (array $items) {
try {
$result = $this->usersModel->delete($items);
$text = $this->translator->t('system', $result !== false ? 'delete_success' : 'delete_error');
} catch (Users\Exception\SuperUserNotDeletableException $e) {
$result = false;
$text = $this->translator->t('users', 'admin_user_undeletable');
}
$bool = $this->userRepository->delete($item);
return $this->redirectMessages()->setMessage(
$result,
$text
);
}
if ($isAdminUser === true) {
$bool = false;
$text = $this->translator->t('users', 'admin_user_undeletable');
} else {
$text = $this->translator->t('system', $bool !== false ? 'delete_success' : 'delete_error');
}
Core\Cache\Purge::doPurge($this->appPath->getCacheDir() . 'http');
return $this->redirectMessages()->setMessage(
$bool,
$text,
$selfDelete === true ? $this->appPath->getWebRoot() : ''
);
}
);
}
}
......@@ -23,10 +23,6 @@ class Edit extends AbstractFormAction
* @var \ACP3\Core\Helpers\Secure
*/
protected $secureHelper;
/**
* @var \ACP3\Modules\ACP3\Users\Model\Repository\UserRepository
*/
protected $userRepository;
/**
* @var \ACP3\Modules\ACP3\Users\Validation\AdminFormValidation
*/
......@@ -39,6 +35,10 @@ class Edit extends AbstractFormAction
* @var \ACP3\Modules\ACP3\Users\Model\AuthenticationModel
*/
protected $authenticationModel;
/**
* @var Users\Model\UsersModel
*/
protected $usersModel;
/**
* Edit constructor.
......@@ -48,7 +48,7 @@ class Edit extends AbstractFormAction
* @param \ACP3\Core\Helpers\Secure $secureHelper
* @param \ACP3\Core\Helpers\Forms $formsHelpers
* @param \ACP3\Modules\ACP3\Users\Model\AuthenticationModel $authenticationModel
* @param \ACP3\Modules\ACP3\Users\Model\Repository\UserRepository $userRepository
* @param Users\Model\UsersModel $usersModel
* @param \ACP3\Modules\ACP3\Users\Validation\AdminFormValidation $adminFormValidation
* @param \ACP3\Modules\ACP3\Permissions\Helpers $permissionsHelpers
*/
......@@ -58,7 +58,7 @@ class Edit extends AbstractFormAction
Core\Helpers\Secure $secureHelper,
Core\Helpers\Forms $formsHelpers,
Users\Model\AuthenticationModel $authenticationModel,
Users\Model\Repository\UserRepository $userRepository,
Users\Model\UsersModel $usersModel,
Users\Validation\AdminFormValidation $adminFormValidation,
Permissions\Helpers $permissionsHelpers
) {
......@@ -67,9 +67,9 @@ class Edit extends AbstractFormAction
$this->formTokenHelper = $formTokenHelper;
$this->secureHelper = $secureHelper;
$this->authenticationModel = $authenticationModel;
$this->userRepository = $userRepository;
$this->adminFormValidation = $adminFormValidation;
$this->permissionsHelpers = $permissionsHelpers;
$this->usersModel = $usersModel;
}
/**
......@@ -80,9 +80,9 @@ class Edit extends AbstractFormAction
*/
public function execute($id)
{
if ($this->userRepository->resultExists($id) === true) {
$user = $this->user->getUserInfo($id);
$user = $this->user->getUserInfo($id);
if (!empty($user)) {
$this->title->setPageTitlePostfix($user['nickname']);
if ($this->request->getPost()->count() !== 0) {
......@@ -128,57 +128,31 @@ class Edit extends AbstractFormAction
/**
* @param array $formData
* @param int $id
* @param int $userId
*
* @return \Symfony\Component\HttpFoundation\RedirectResponse
*/
protected function executePost(array $formData, $id)
protected function executePost(array $formData, $userId)
{
return $this->actionHelper->handleEditPostAction(function () use ($formData, $id) {
return $this->actionHelper->handleEditPostAction(function () use ($formData, $userId) {
$this->adminFormValidation
->setUserId($id)
->setUserId($userId)
->validate($formData);
$updateValues = [
'super_user' => (int)$formData['super_user'],
'nickname' => $this->secureHelper->strEncode($formData['nickname']),
'realname' => $this->secureHelper->strEncode($formData['realname']),
'gender' => (int)$formData['gender'],
'birthday' => $formData['birthday'],
'birthday_display' => (int)$formData['birthday_display'],
'mail' => $formData['mail'],
'mail_display' => (int)$formData['mail_display'],
'website' => $this->secureHelper->strEncode($formData['website']),
'icq' => $formData['icq'],
'skype' => $this->secureHelper->strEncode($formData['skype']),
'street' => $this->secureHelper->strEncode($formData['street']),
'house_number' => $this->secureHelper->strEncode($formData['house_number']),
'zip' => $this->secureHelper->strEncode($formData['zip']),
'city' => $this->secureHelper->strEncode($formData['city']),
'address_display' => (int)$formData['address_display'],
'country' => $this->secureHelper->strEncode($formData['country']),
'country_display' => (int)$formData['country_display'],
'date_format_long' => $this->secureHelper->strEncode($formData['date_format_long']),
'date_format_short' => $this->secureHelper->strEncode($formData['date_format_short']),
'time_zone' => $formData['date_time_zone'],
'language' => $formData['language'],
'entries' => (int)$formData['entries'],
];
$formData['time_zone'] = $formData['date_time_zone'];
$this->permissionsHelpers->updateUserRoles($formData['roles'], $id);
$this->permissionsHelpers->updateUserRoles($formData['roles'], $userId);
if (!empty($formData['new_pwd']) && !empty($formData['new_pwd_repeat'])) {
$salt = $this->secureHelper->salt(Users\Model\UserModel::SALT_LENGTH);
$newPassword = $this->secureHelper->generateSaltedPassword($salt, $formData['new_pwd'], 'sha512');
$updateValues['pwd'] = $newPassword;
$updateValues['pwd_salt'] = $salt;
$formData['pwd'] = $newPassword;
$formData['pwd_salt'] = $salt;
}
$bool = $this->userRepository->update($updateValues, $id);
$this->updateCurrentlyLoggedInUserCookie($id);
$bool = $this->usersModel->save($formData, $userId);
Core\Cache\Purge::doPurge($this->appPath->getCacheDir() . 'http');
$this->updateCurrentlyLoggedInUserCookie($userId);
return $bool;
});
......@@ -190,7 +164,7 @@ class Edit extends AbstractFormAction
protected function updateCurrentlyLoggedInUserCookie($userId)
{
if ($userId == $this->user->getUserId() && $this->request->getCookies()->has(Users\Model\AuthenticationModel::AUTH_NAME)) {
$user = $this->userRepository->getOneById($userId);
$user = $this->usersModel->getOneById($userId);
$cookie = $this->authenticationModel->setRememberMeCookie(
$userId,
$user['remember_me_token']
......
......@@ -27,10 +27,6 @@ class Edit extends AbstractAction
* @var \ACP3\Modules\ACP3\Users\Helpers\Forms
*/
protected $userFormsHelper;
/**
* @var \ACP3\Modules\ACP3\Users\Model\Repository\UserRepository
*/
protected $userRepository;
/**
* @var \ACP3\Modules\ACP3\Users\Validation\AccountFormValidation
*/
......@@ -39,6 +35,10 @@ class Edit extends AbstractAction
* @var \ACP3\Modules\ACP3\Users\Model\AuthenticationModel
*/
protected $authenticationModel;
/**
* @var Users\Model\UsersModel
*/
protected $usersModel;
/**
* Edit constructor.
......@@ -48,7 +48,7 @@ class Edit extends AbstractAction
* @param \ACP3\Core\Helpers\Secure $secureHelper
* @param \ACP3\Modules\ACP3\Users\Helpers\Forms $userFormsHelper
* @param \ACP3\Modules\ACP3\Users\Model\AuthenticationModel $authenticationModel
* @param \ACP3\Modules\ACP3\Users\Model\Repository\UserRepository $userRepository
* @param Users\Model\UsersModel $usersModel
* @param \ACP3\Modules\ACP3\Users\Validation\AccountFormValidation $accountFormValidation
*/
public function __construct(
......@@ -57,7 +57,7 @@ class Edit extends AbstractAction
Core\Helpers\Secure $secureHelper,
Users\Helpers\Forms $userFormsHelper,
Users\Model\AuthenticationModel $authenticationModel,
Users\Model\Repository\UserRepository $userRepository,
Users\Model\UsersModel $usersModel,
Users\Validation\AccountFormValidation $accountFormValidation
) {
parent::__construct($context);
......@@ -66,8 +66,8 @@ class Edit extends AbstractAction
$this->secureHelper = $secureHelper;
$this->userFormsHelper = $userFormsHelper;
$this->authenticationModel = $authenticationModel;
$this->userRepository = $userRepository;
$this->accountFormValidation = $accountFormValidation;
$this->usersModel = $usersModel;
}
/**
......@@ -114,41 +114,22 @@ class Edit extends AbstractAction
->setUserId($this->user->getUserId())
->validate($formData);
$updateValues = [
'nickname' => $this->secureHelper->strEncode($formData['nickname']),
'realname' => $this->secureHelper->strEncode($formData['realname']),
'gender' => (int)$formData['gender'],
'birthday' => $formData['birthday'],
'mail' => $formData['mail'],
'website' => $this->secureHelper->strEncode($formData['website']),
'icq' => $formData['icq'],
'skype' => $this->secureHelper->strEncode($formData['skype']),
'street' => $this->secureHelper->strEncode($formData['street']),
'house_number' => $this->secureHelper->strEncode($formData['house_number']),
'zip' => $this->secureHelper->strEncode($formData['zip']),
'city' => $this->secureHelper->strEncode($formData['city']),
'country' => $this->secureHelper->strEncode($formData['country']),
];
// Neues Passwort
if (!empty($formData['new_pwd']) && !empty($formData['new_pwd_repeat'])) {
$salt = $this->secureHelper->salt(Users\Model\UserModel::SALT_LENGTH);
$newPassword = $this->secureHelper->generateSaltedPassword($salt, $formData['new_pwd'], 'sha512');
$updateValues['pwd'] = $newPassword;
$updateValues['pwd_salt'] = $salt;
$formData['pwd'] = $newPassword;
$formData['pwd_salt'] = $salt;
}
$bool = $this->userRepository->update($updateValues, $this->user->getUserId());
$bool = $this->usersModel->save($formData, $this->user->getUserId());
$user = $this->userRepository->getOneById($this->user->getUserId());
$user = $this->usersModel->getOneById($this->user->getUserId());
$cookie = $this->authenticationModel->setRememberMeCookie(
$this->user->getUserId(),
$user['remember_me_token']
);
$this->response->headers->setCookie($cookie);
Core\Cache\Purge::doPurge($this->appPath->getCacheDir() . 'http');
return $this->redirectMessages()->setMessage(
$bool,
$this->translator->t('system', $bool !== false ? 'edit_success' : 'edit_error')
......
......@@ -18,48 +18,41 @@ class Settings extends AbstractAction
* @var \ACP3\Core\Helpers\FormToken
*/
protected $formTokenHelper;
/**
* @var \ACP3\Modules\ACP3\Users\Model\Repository\UserRepository
*/
protected $userRepository;
/**
* @var \ACP3\Modules\ACP3\Users\Validation\AccountSettingsFormValidation
*/
protected $accountSettingsFormValidation;
/**
* @var \ACP3\Core\Helpers\Secure
*/
protected $secureHelper;
/**
* @var \ACP3\Modules\ACP3\Users\Helpers\Forms
*/
protected $userFormsHelper;
/**
* @var Users\Model\UsersModel
*/
protected $usersModel;
/**
* Settings constructor.
*
* @param \ACP3\Core\Controller\Context\FrontendContext $context
* @param \ACP3\Core\Helpers\FormToken $formTokenHelper
* @param \ACP3\Core\Helpers\Secure $secureHelper
* @param \ACP3\Modules\ACP3\Users\Helpers\Forms $userFormsHelper
* @param \ACP3\Modules\ACP3\Users\Model\Repository\UserRepository $userRepository
* @param \ACP3\Core\Controller\Context\FrontendContext $context
* @param \ACP3\Core\Helpers\FormToken $formTokenHelper
* @param \ACP3\Modules\ACP3\Users\Helpers\Forms $userFormsHelper
* @param Users\Model\UsersModel $usersModel
* @param \ACP3\Modules\ACP3\Users\Validation\AccountSettingsFormValidation $accountSettingsFormValidation
*/
public function __construct(
Core\Controller\Context\FrontendContext $context,
Core\Helpers\FormToken $formTokenHelper,
Core\Helpers\Secure $secureHelper,
Users\Helpers\Forms $userFormsHelper,
Users\Model\Repository\UserRepository $userRepository,
Users\Model\UsersModel $usersModel,
Users\Validation\AccountSettingsFormValidation $accountSettingsFormValidation
) {
parent::__construct($context);
$this->formTokenHelper = $formTokenHelper;
$this->secureHelper = $secureHelper;
$this->userFormsHelper = $userFormsHelper;
$this->userRepository = $userRepository;
$this->accountSettingsFormValidation = $accountSettingsFormValidation;
$this->usersModel = $usersModel;
}
/**
......@@ -73,7 +66,7 @@ class Settings extends AbstractAction
return $this->executePost($this->request->getPost()->all(), $settings);
}
$user = $this->userRepository->getOneById($this->user->getUserId());
$user = $this->usersModel->getOneById($this->user->getUserId());
$this->view->assign(
$this->get('users.helpers.forms')->fetchUserSettingsFormFields(
......@@ -109,25 +102,16 @@ class Settings extends AbstractAction
->setSettings($settings)
->validate($formData);
$updateValues = [
'mail_display' => (int)$formData['mail_display'],
'birthday_display' => (int)$formData['birthday_display'],
'address_display' => (int)$formData['address_display'],
'country_display' => (int)$formData['country_display'],
'date_format_long' => $this->get('core.helpers.secure')->strEncode($formData['date_format_long']),
'date_format_short' => $this->get('core.helpers.secure')->strEncode($formData['date_format_short']),
'time_zone' => $formData['date_time_zone'],
];
if ($settings['language_override'] == 1) {
$updateValues['language'] = $formData['language'];
$formData['time_zone'] = $formData['date_time_zone'];
if ($settings['language_override'] == 0) {
unset($formData['language']);
}
if ($settings['entries_override'] == 1) {
$updateValues['entries'] = (int)$formData['entries'];
if ($settings['entries_override'] == 0) {
unset($formData['entries']);
}
$bool = $this->userRepository->update($updateValues, $this->user->getUserId());
Core\Cache\Purge::doPurge($this->appPath->getCacheDir() . 'http');
$bool = $this->usersModel->save($formData, $this->user->getUserId());
return $this->redirectMessages()->setMessage(
$bool,
......
<?php
/**
* Copyright (c) 2016 by the ACP3 Developers.
* See the LICENCE file at the top-level module directory for licencing details.
*/
namespace ACP3\Modules\ACP3\Users\Event\Listener;
use ACP3\Core\Model\Event\ModelSaveEvent;
use ACP3\Modules\ACP3\Users\Exception\SuperUserNotDeletableException;
use ACP3\Modules\ACP3\Users\Model\UserModel;
class OnUsersModelDeleteBeforeListener
{
/**
* @var UserModel
*/
private $userModel;
/**
* OnUsersModelDeleteBeforeListener constructor.
* @param UserModel $userModel
*/
public function __construct(UserModel $userModel)
{
$this->userModel = $userModel;
}
/**
* @param ModelSaveEvent $event
* @throws SuperUserNotDeletableException
*/
public function forbidSuperUserDelete(ModelSaveEvent $event)
{
if (!$event->isDeleteStatement()) {
return;
}
foreach ($event->getEntryId() as $item) {
$user = $this->userModel->getUserInfo($item);
if ($user['super_user'] == 1) {
throw new SuperUserNotDeletableException();
}
}
}
}
<?php
/**
* Copyright (c) 2016 by the ACP3 Developers.
* See the LICENCE file at the top-level module directory for licencing details.
*/
namespace ACP3\Modules\ACP3\Users\Exception;
class SuperUserNotDeletableException extends \Exception
{
}
<?php
/**
* Copyright (c) 2016 by the ACP3 Developers.
* See the LICENCE file at the top-level module directory for licencing details.
*/
namespace ACP3\Modules\ACP3\Users\Model;
use ACP3\Core\Model\AbstractModel;
use ACP3\Core\Model\DataProcessor\ColumnTypes;
use ACP3\Modules\ACP3\Users\Installer\Schema;
class UsersModel extends AbstractModel
{
const EVENT_PREFIX = Schema::MODULE_NAME;
/**
* @return array
*/
protected function getAllowedColumns()
{
return [
'super_user' => ColumnTypes::COLUMN_TYPE_INT,
'nickname' => ColumnTypes::COLUMN_TYPE_TEXT,
'pwd' => ColumnTypes::COLUMN_TYPE_RAW,
'pwd_salt' => ColumnTypes::COLUMN_TYPE_RAW,
'realname' => ColumnTypes::COLUMN_TYPE_TEXT,
'gender' => ColumnTypes::COLUMN_TYPE_INT,
'birthday' => ColumnTypes::COLUMN_TYPE_DATETIME,
'birthday_display' => ColumnTypes::COLUMN_TYPE_BOOLEAN,
'mail' => ColumnTypes::COLUMN_TYPE_TEXT,
'mail_display' => ColumnTypes::COLUMN_TYPE_BOOLEAN,
'website' => ColumnTypes::COLUMN_TYPE_TEXT,
'icq' => ColumnTypes::COLUMN_TYPE_TEXT,
'skype' => ColumnTypes::COLUMN_TYPE_TEXT,
'street' => ColumnTypes::COLUMN_TYPE_TEXT,
'house_number' => ColumnTypes::COLUMN_TYPE_TEXT,
'zip' => ColumnTypes::COLUMN_TYPE_TEXT,
'city' => ColumnTypes::COLUMN_TYPE_TEXT,
'address_display' => ColumnTypes::COLUMN_TYPE_BOOLEAN,
'country' => ColumnTypes::COLUMN_TYPE_TEXT,
'country_display' => ColumnTypes::COLUMN_TYPE_BOOLEAN,
'date_format_long' => ColumnTypes::COLUMN_TYPE_TEXT,
'date_format_short' => ColumnTypes::COLUMN_TYPE_TEXT,
'time_zone' => ColumnTypes::COLUMN_TYPE_RAW,
'language' => ColumnTypes::COLUMN_TYPE_RAW,
'entries' => ColumnTypes::COLUMN_TYPE_INT,
'registration_date' => ColumnTypes::COLUMN_TYPE_DATETIME
];
}
}
......@@ -3,11 +3,10 @@ services:
class: ACP3\Modules\ACP3\Users\Controller\Admin\Index\Create
arguments:
- '@core.context.admin'
- '@core.date'
- '@core.helpers.formToken'
- '@core.helpers.secure'
- '@core.helpers.forms'
- '@users.model.userrepository'
- '@users.model.users_model'
- '@users.validator.admin'
- '@permissions.helpers'
......@@ -15,8 +14,7 @@ services:
class: ACP3\Modules\ACP3\Users\Controller\Admin\Index\Delete
arguments:
- '@core.context.admin'
- '@users.model.authentication_model'
- '@users.model.userrepository'
- '@users.model.users_model'
users.controller.admin.index.edit:
class: ACP3\Modules\ACP3\Users\Controller\Admin\Index\Edit
......@@ -26,7 +24,7 @@ services:
- '@core.helpers.secure'
- '@core.helpers.forms'
- '@users.model.authentication_model'
- '@users.model.userrepository'
- '@users.model.users_model'
- '@users.validator.admin'
- '@permissions.helpers'
......@@ -52,7 +50,7 @@ services:
- '@core.helpers.secure'
- '@users.helpers.forms'
- '@users.model.authentication_model'
- '@users.model.userrepository'
- '@users.model.users_model'
- '@users.validator.account'
users.controller.frontend.account.index:
......@@ -64,9 +62,8 @@ services:
arguments:
- '@core.context.frontend'
- '@core.helpers.formToken'
- '@core.helpers.secure'
- '@users.helpers.forms'
- '@users.model.userrepository'
- '@users.model.users_model'
- '@users.validation.account_settings_form_validation'