/**
  * Return the back end themes as array
  *
  * @return array An array of available back end themes
  *
  * @deprecated Use Backend::getThemes() instead
  */
 public static function getBackendThemes()
 {
     return \Backend::getThemes();
 }
Exemplo n.º 2
0
<?php

/**
 * Contao Open Source CMS
 *
 * Copyright (c) 2005-2016 Leo Feyer
 *
 * @license LGPL-3.0+
 */
/**
 * Table tl_user
 */
$GLOBALS['TL_DCA']['tl_user'] = array('config' => array('dataContainer' => 'Table', 'enableVersioning' => true, 'onload_callback' => array(array('tl_user', 'checkPermission')), 'onsubmit_callback' => array(array('tl_user', 'storeDateAdded'), array('tl_user', 'checkRemoveSession')), 'ondelete_callback' => array(array('tl_user', 'removeSession')), 'sql' => array('keys' => array('id' => 'primary', 'username' => 'unique', 'email' => 'index'))), 'list' => array('sorting' => array('mode' => 2, 'fields' => array('dateAdded DESC'), 'flag' => 1, 'panelLayout' => 'filter;sort,search,limit'), 'label' => array('fields' => array('icon', 'name', 'username', 'dateAdded'), 'showColumns' => true, 'label_callback' => array('tl_user', 'addIcon')), 'global_operations' => array('all' => array('label' => &$GLOBALS['TL_LANG']['MSC']['all'], 'href' => 'act=select', 'class' => 'header_edit_all', 'attributes' => 'onclick="Backend.getScrollOffset()" accesskey="e"')), 'operations' => array('edit' => array('label' => &$GLOBALS['TL_LANG']['tl_user']['edit'], 'href' => 'act=edit', 'icon' => 'edit.gif', 'button_callback' => array('tl_user', 'editUser')), 'copy' => array('label' => &$GLOBALS['TL_LANG']['tl_user']['copy'], 'href' => 'act=copy', 'icon' => 'copy.gif', 'button_callback' => array('tl_user', 'copyUser')), 'delete' => array('label' => &$GLOBALS['TL_LANG']['tl_user']['delete'], 'href' => 'act=delete', 'icon' => 'delete.gif', 'attributes' => 'onclick="if(!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm'] . '\'))return false;Backend.getScrollOffset()"', 'button_callback' => array('tl_user', 'deleteUser')), 'toggle' => array('label' => &$GLOBALS['TL_LANG']['tl_user']['toggle'], 'icon' => 'visible.gif', 'attributes' => 'onclick="Backend.getScrollOffset();return AjaxRequest.toggleVisibility(this,%s)"', 'button_callback' => array('tl_user', 'toggleIcon')), 'show' => array('label' => &$GLOBALS['TL_LANG']['tl_user']['show'], 'href' => 'act=show', 'icon' => 'show.gif'), 'su' => array('label' => &$GLOBALS['TL_LANG']['tl_user']['su'], 'href' => 'key=su', 'icon' => 'su.gif', 'button_callback' => array('tl_user', 'switchUser')))), 'palettes' => array('__selector__' => array('inherit', 'admin'), 'login' => '{name_legend},name,email;{backend_legend},language,uploader,showHelp,thumbnails,useRTE,useCE;{session_legend},session;{theme_legend:hide},backendTheme;{password_legend},password', 'admin' => '{name_legend},username,name,email;{backend_legend:hide},language,uploader,showHelp,thumbnails,useRTE,useCE;{theme_legend:hide},backendTheme;{password_legend:hide},pwChange,password;{admin_legend},admin;{account_legend},disable,start,stop', 'default' => '{name_legend},username,name,email;{backend_legend:hide},language,uploader,showHelp,thumbnails,useRTE,useCE;{theme_legend:hide},backendTheme;{password_legend:hide},pwChange,password;{admin_legend},admin;{groups_legend},groups,inherit;{account_legend},disable,start,stop', 'group' => '{name_legend},username,name,email;{backend_legend:hide},language,uploader,showHelp,thumbnails,useRTE,useCE;{theme_legend:hide},backendTheme;{password_legend:hide},pwChange,password;{admin_legend},admin;{groups_legend},groups,inherit;{account_legend},disable,start,stop', 'extend' => '{name_legend},username,name,email;{backend_legend:hide},language,uploader,showHelp,thumbnails,useRTE,useCE;{theme_legend:hide},backendTheme;{password_legend:hide},pwChange,password;{admin_legend},admin;{groups_legend},groups,inherit;{modules_legend},modules,themes;{pagemounts_legend},pagemounts,alpty;{filemounts_legend},filemounts,fop;{forms_legend},forms,formp;{account_legend},disable,start,stop', 'custom' => '{name_legend},username,name,email;{backend_legend:hide},language,uploader,showHelp,thumbnails,useRTE,useCE;{theme_legend:hide},backendTheme;{password_legend:hide},pwChange,password;{admin_legend},admin;{groups_legend},groups,inherit;{modules_legend},modules,themes;{pagemounts_legend},pagemounts,alpty;{filemounts_legend},filemounts,fop;{forms_legend},forms,formp;{account_legend},disable,start,stop'), 'fields' => array('id' => array('sql' => "int(10) unsigned NOT NULL auto_increment"), 'tstamp' => array('sql' => "int(10) unsigned NOT NULL default '0'"), 'username' => array('label' => &$GLOBALS['TL_LANG']['tl_user']['username'], 'exclude' => true, 'search' => true, 'sorting' => true, 'flag' => 1, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'rgxp' => 'extnd', 'nospace' => true, 'unique' => true, 'maxlength' => 64), 'sql' => "varchar(64) COLLATE utf8_bin NULL"), 'name' => array('label' => &$GLOBALS['TL_LANG']['tl_user']['name'], 'exclude' => true, 'search' => true, 'sorting' => true, 'flag' => 1, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'email' => array('label' => &$GLOBALS['TL_LANG']['tl_user']['email'], 'exclude' => true, 'search' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'rgxp' => 'email', 'maxlength' => 255, 'unique' => true, 'decodeEntities' => true, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'language' => array('label' => &$GLOBALS['TL_LANG']['tl_user']['language'], 'default' => str_replace('-', '_', $GLOBALS['TL_LANGUAGE']), 'exclude' => true, 'filter' => true, 'inputType' => 'select', 'options' => System::getLanguages(true), 'eval' => array('rgxp' => 'locale', 'tl_class' => 'w50'), 'sql' => "varchar(5) NOT NULL default ''"), 'backendTheme' => array('label' => &$GLOBALS['TL_LANG']['tl_user']['backendTheme'], 'exclude' => true, 'inputType' => 'select', 'options' => Backend::getThemes(), 'sql' => "varchar(32) NOT NULL default ''"), 'uploader' => array('label' => &$GLOBALS['TL_LANG']['tl_user']['uploader'], 'exclude' => true, 'inputType' => 'select', 'options' => array('DropZone', 'FileUpload'), 'reference' => &$GLOBALS['TL_LANG']['tl_user'], 'eval' => array('tl_class' => 'w50'), 'sql' => "varchar(32) NOT NULL default ''"), 'showHelp' => array('label' => &$GLOBALS['TL_LANG']['tl_user']['showHelp'], 'default' => 1, 'exclude' => true, 'inputType' => 'checkbox', 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''"), 'thumbnails' => array('label' => &$GLOBALS['TL_LANG']['tl_user']['thumbnails'], 'default' => 1, 'exclude' => true, 'inputType' => 'checkbox', 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''"), 'useRTE' => array('label' => &$GLOBALS['TL_LANG']['tl_user']['useRTE'], 'default' => 1, 'exclude' => true, 'inputType' => 'checkbox', 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''"), 'useCE' => array('label' => &$GLOBALS['TL_LANG']['tl_user']['useCE'], 'default' => 1, 'exclude' => true, 'inputType' => 'checkbox', 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''"), 'password' => array('label' => &$GLOBALS['TL_LANG']['MSC']['password'], 'exclude' => true, 'inputType' => 'password', 'eval' => array('mandatory' => true, 'preserveTags' => true, 'minlength' => Config::get('minPasswordLength')), 'sql' => "varchar(128) NOT NULL default ''"), 'pwChange' => array('label' => &$GLOBALS['TL_LANG']['tl_user']['pwChange'], 'exclude' => true, 'inputType' => 'checkbox', 'filter' => true, 'sql' => "char(1) NOT NULL default ''"), 'admin' => array('label' => &$GLOBALS['TL_LANG']['tl_user']['admin'], 'exclude' => true, 'inputType' => 'checkbox', 'filter' => true, 'eval' => array('submitOnChange' => true), 'save_callback' => array(array('tl_user', 'checkAdminStatus')), 'sql' => "char(1) NOT NULL default ''"), 'groups' => array('label' => &$GLOBALS['TL_LANG']['tl_user']['groups'], 'exclude' => true, 'filter' => true, 'inputType' => 'checkboxWizard', 'foreignKey' => 'tl_user_group.name', 'eval' => array('multiple' => true), 'sql' => "blob NULL", 'relation' => array('type' => 'belongsToMany', 'load' => 'lazy')), 'inherit' => array('label' => &$GLOBALS['TL_LANG']['tl_user']['inherit'], 'exclude' => true, 'default' => 'group', 'inputType' => 'radio', 'options' => array('group', 'extend', 'custom'), 'reference' => &$GLOBALS['TL_LANG']['tl_user'], 'eval' => array('helpwizard' => true, 'submitOnChange' => true), 'sql' => "varchar(12) NOT NULL default ''"), 'modules' => array('label' => &$GLOBALS['TL_LANG']['tl_user']['modules'], 'exclude' => true, 'filter' => true, 'inputType' => 'checkbox', 'options_callback' => array('tl_user', 'getModules'), 'reference' => &$GLOBALS['TL_LANG']['MOD'], 'eval' => array('multiple' => true, 'helpwizard' => true), 'sql' => "blob NULL"), 'themes' => array('label' => &$GLOBALS['TL_LANG']['tl_user']['themes'], 'exclude' => true, 'inputType' => 'checkbox', 'options' => array('css', 'modules', 'layout', 'image_sizes', 'theme_import', 'theme_export'), 'reference' => &$GLOBALS['TL_LANG']['MOD'], 'eval' => array('multiple' => true), 'sql' => "blob NULL"), 'pagemounts' => array('label' => &$GLOBALS['TL_LANG']['tl_user']['pagemounts'], 'exclude' => true, 'inputType' => 'pageTree', 'eval' => array('multiple' => true, 'fieldType' => 'checkbox'), 'sql' => "blob NULL"), 'alpty' => array('label' => &$GLOBALS['TL_LANG']['tl_user']['alpty'], 'default' => array('regular', 'redirect', 'forward'), 'exclude' => true, 'inputType' => 'checkbox', 'options' => array_keys($GLOBALS['TL_PTY']), 'reference' => &$GLOBALS['TL_LANG']['PTY'], 'eval' => array('multiple' => true, 'helpwizard' => true), 'sql' => "blob NULL"), 'filemounts' => array('label' => &$GLOBALS['TL_LANG']['tl_user']['filemounts'], 'exclude' => true, 'inputType' => 'fileTree', 'eval' => array('multiple' => true, 'fieldType' => 'checkbox'), 'sql' => "blob NULL"), 'fop' => array('label' => &$GLOBALS['TL_LANG']['FOP']['fop'], 'default' => array('f1', 'f2', 'f3'), 'exclude' => true, 'inputType' => 'checkbox', 'options' => array('f1', 'f2', 'f3', 'f4', 'f5', 'f6'), 'reference' => &$GLOBALS['TL_LANG']['FOP'], 'eval' => array('multiple' => true), 'sql' => "blob NULL"), 'forms' => array('label' => &$GLOBALS['TL_LANG']['tl_user']['forms'], 'exclude' => true, 'inputType' => 'checkbox', 'foreignKey' => 'tl_form.title', 'eval' => array('multiple' => true), 'sql' => "blob NULL"), 'formp' => array('label' => &$GLOBALS['TL_LANG']['tl_user']['formp'], 'exclude' => true, 'inputType' => 'checkbox', 'options' => array('create', 'delete'), 'reference' => &$GLOBALS['TL_LANG']['MSC'], 'eval' => array('multiple' => true), 'sql' => "blob NULL"), 'disable' => array('label' => &$GLOBALS['TL_LANG']['tl_user']['disable'], 'exclude' => true, 'filter' => true, 'flag' => 2, 'inputType' => 'checkbox', 'save_callback' => array(array('tl_user', 'checkAdminDisable')), 'sql' => "char(1) NOT NULL default ''"), 'start' => array('label' => &$GLOBALS['TL_LANG']['tl_user']['start'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('rgxp' => 'datim', 'datepicker' => true, 'tl_class' => 'w50 wizard'), 'sql' => "varchar(10) NOT NULL default ''"), 'stop' => array('label' => &$GLOBALS['TL_LANG']['tl_user']['stop'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('rgxp' => 'datim', 'datepicker' => true, 'tl_class' => 'w50 wizard'), 'sql' => "varchar(10) NOT NULL default ''"), 'session' => array('label' => &$GLOBALS['TL_LANG']['tl_user']['session'], 'exclude' => true, 'input_field_callback' => array('tl_user', 'sessionField'), 'eval' => array('doNotShow' => true, 'doNotCopy' => true), 'sql' => "blob NULL"), 'dateAdded' => array('label' => &$GLOBALS['TL_LANG']['MSC']['dateAdded'], 'default' => time(), 'sorting' => true, 'flag' => 6, 'eval' => array('rgxp' => 'datim', 'doNotCopy' => true), 'sql' => "int(10) unsigned NOT NULL default '0'"), 'lastLogin' => array('eval' => array('rgxp' => 'datim', 'doNotShow' => true, 'doNotCopy' => true), 'sql' => "int(10) unsigned NOT NULL default '0'"), 'currentLogin' => array('label' => &$GLOBALS['TL_LANG']['MSC']['lastLogin'], 'sorting' => true, 'flag' => 6, 'eval' => array('rgxp' => 'datim', 'doNotCopy' => true), 'sql' => "int(10) unsigned NOT NULL default '0'"), 'loginCount' => array('default' => 3, 'eval' => array('doNotCopy' => true), 'sql' => "smallint(5) unsigned NOT NULL default '3'"), 'locked' => array('eval' => array('rgxp' => 'datim', 'doNotCopy' => true), 'sql' => "int(10) unsigned NOT NULL default '0'")));
/**
 * Provide miscellaneous methods that are used by the data configuration array.
 *
 * @author Leo Feyer <https://github.com/leofeyer>
 */
class tl_user extends Backend
{
    /**
     * Import the back end user object
     */
    public function __construct()
    {
        parent::__construct();
        $this->import('BackendUser', 'User');
    }
    /**
     * Check permissions to edit table tl_user
     */
Exemplo n.º 3
0
<?php

/**
 * Contao Open Source CMS
 *
 * Copyright (c) 2005-2016 Leo Feyer
 *
 * @license LGPL-3.0+
 */
/**
 * Table tl_user
 */
$GLOBALS['TL_DCA']['tl_user'] = array('config' => array('dataContainer' => 'Table', 'enableVersioning' => true, 'onload_callback' => array(array('tl_user', 'checkPermission')), 'onsubmit_callback' => array(array('tl_user', 'storeDateAdded'), array('tl_user', 'checkRemoveSession')), 'ondelete_callback' => array(array('tl_user', 'removeSession')), 'sql' => array('keys' => array('id' => 'primary', 'username' => 'unique', 'email' => 'index'))), 'list' => array('sorting' => array('mode' => 2, 'fields' => array('dateAdded DESC'), 'flag' => 1, 'panelLayout' => 'filter;sort,search,limit'), 'label' => array('fields' => array('icon', 'name', 'username', 'dateAdded'), 'showColumns' => true, 'label_callback' => array('tl_user', 'addIcon')), 'global_operations' => array('all' => array('label' => &$GLOBALS['TL_LANG']['MSC']['all'], 'href' => 'act=select', 'class' => 'header_edit_all', 'attributes' => 'onclick="Backend.getScrollOffset()" accesskey="e"')), 'operations' => array('edit' => array('label' => &$GLOBALS['TL_LANG']['tl_user']['edit'], 'href' => 'act=edit', 'icon' => 'edit.svg', 'button_callback' => array('tl_user', 'editUser')), 'copy' => array('label' => &$GLOBALS['TL_LANG']['tl_user']['copy'], 'href' => 'act=copy', 'icon' => 'copy.svg', 'button_callback' => array('tl_user', 'copyUser')), 'delete' => array('label' => &$GLOBALS['TL_LANG']['tl_user']['delete'], 'href' => 'act=delete', 'icon' => 'delete.svg', 'attributes' => 'onclick="if(!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm'] . '\'))return false;Backend.getScrollOffset()"', 'button_callback' => array('tl_user', 'deleteUser')), 'toggle' => array('label' => &$GLOBALS['TL_LANG']['tl_user']['toggle'], 'icon' => 'visible.svg', 'attributes' => 'onclick="Backend.getScrollOffset();return AjaxRequest.toggleVisibility(this,%s)"', 'button_callback' => array('tl_user', 'toggleIcon')), 'show' => array('label' => &$GLOBALS['TL_LANG']['tl_user']['show'], 'href' => 'act=show', 'icon' => 'show.svg'), 'su' => array('label' => &$GLOBALS['TL_LANG']['tl_user']['su'], 'href' => 'key=su', 'icon' => 'su.svg', 'button_callback' => array('tl_user', 'switchUser')))), 'palettes' => array('__selector__' => array('inherit', 'admin'), 'login' => '{name_legend},name,email;{backend_legend},language,uploader,showHelp,thumbnails,useRTE,useCE;{session_legend},session;{theme_legend:hide},backendTheme;{password_legend},password', 'admin' => '{name_legend},username,name,email;{backend_legend:hide},language,uploader,showHelp,thumbnails,useRTE,useCE;{theme_legend:hide},backendTheme;{password_legend:hide},pwChange,password;{admin_legend},admin;{account_legend},disable,start,stop', 'default' => '{name_legend},username,name,email;{backend_legend:hide},language,uploader,showHelp,thumbnails,useRTE,useCE;{theme_legend:hide},backendTheme;{password_legend:hide},pwChange,password;{admin_legend},admin;{groups_legend},groups,inherit;{account_legend},disable,start,stop', 'group' => '{name_legend},username,name,email;{backend_legend:hide},language,uploader,showHelp,thumbnails,useRTE,useCE;{theme_legend:hide},backendTheme;{password_legend:hide},pwChange,password;{admin_legend},admin;{groups_legend},groups,inherit;{account_legend},disable,start,stop', 'extend' => '{name_legend},username,name,email;{backend_legend:hide},language,uploader,showHelp,thumbnails,useRTE,useCE;{theme_legend:hide},backendTheme;{password_legend:hide},pwChange,password;{admin_legend},admin;{groups_legend},groups,inherit;{modules_legend},modules,themes;{pagemounts_legend},pagemounts,alpty;{filemounts_legend},filemounts,fop;{imageSizes_legend},imageSizes;{forms_legend},forms,formp;{account_legend},disable,start,stop', 'custom' => '{name_legend},username,name,email;{backend_legend:hide},language,uploader,showHelp,thumbnails,useRTE,useCE;{theme_legend:hide},backendTheme;{password_legend:hide},pwChange,password;{admin_legend},admin;{groups_legend},groups,inherit;{modules_legend},modules,themes;{pagemounts_legend},pagemounts,alpty;{filemounts_legend},filemounts,fop;{imageSizes_legend},imageSizes;{forms_legend},forms,formp;{account_legend},disable,start,stop'), 'fields' => array('id' => array('sql' => "int(10) unsigned NOT NULL auto_increment"), 'tstamp' => array('sql' => "int(10) unsigned NOT NULL default '0'"), 'username' => array('label' => &$GLOBALS['TL_LANG']['tl_user']['username'], 'exclude' => true, 'search' => true, 'sorting' => true, 'flag' => 1, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'rgxp' => 'extnd', 'nospace' => true, 'unique' => true, 'maxlength' => 64), 'sql' => "varchar(64) COLLATE utf8_bin NULL"), 'name' => array('label' => &$GLOBALS['TL_LANG']['tl_user']['name'], 'exclude' => true, 'search' => true, 'sorting' => true, 'flag' => 1, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'email' => array('label' => &$GLOBALS['TL_LANG']['tl_user']['email'], 'exclude' => true, 'search' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'rgxp' => 'email', 'maxlength' => 255, 'unique' => true, 'decodeEntities' => true, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'language' => array('label' => &$GLOBALS['TL_LANG']['tl_user']['language'], 'default' => str_replace('-', '_', $GLOBALS['TL_LANGUAGE']), 'exclude' => true, 'filter' => true, 'inputType' => 'select', 'eval' => array('rgxp' => 'locale', 'tl_class' => 'w50'), 'options_callback' => function () {
    return System::getLanguages(true);
}, 'sql' => "varchar(5) NOT NULL default ''"), 'backendTheme' => array('label' => &$GLOBALS['TL_LANG']['tl_user']['backendTheme'], 'exclude' => true, 'inputType' => 'select', 'options_callback' => function () {
    return Backend::getThemes();
}, 'sql' => "varchar(32) NOT NULL default ''"), 'uploader' => array('label' => &$GLOBALS['TL_LANG']['tl_user']['uploader'], 'exclude' => true, 'inputType' => 'select', 'options' => array('DropZone', 'FileUpload'), 'reference' => &$GLOBALS['TL_LANG']['tl_user'], 'eval' => array('tl_class' => 'w50'), 'sql' => "varchar(32) NOT NULL default ''"), 'showHelp' => array('label' => &$GLOBALS['TL_LANG']['tl_user']['showHelp'], 'default' => 1, 'exclude' => true, 'inputType' => 'checkbox', 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''"), 'thumbnails' => array('label' => &$GLOBALS['TL_LANG']['tl_user']['thumbnails'], 'default' => 1, 'exclude' => true, 'inputType' => 'checkbox', 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''"), 'useRTE' => array('label' => &$GLOBALS['TL_LANG']['tl_user']['useRTE'], 'default' => 1, 'exclude' => true, 'inputType' => 'checkbox', 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''"), 'useCE' => array('label' => &$GLOBALS['TL_LANG']['tl_user']['useCE'], 'default' => 1, 'exclude' => true, 'inputType' => 'checkbox', 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''"), 'password' => array('label' => &$GLOBALS['TL_LANG']['MSC']['password'], 'exclude' => true, 'inputType' => 'password', 'eval' => array('mandatory' => true, 'preserveTags' => true, 'minlength' => Config::get('minPasswordLength')), 'sql' => "varchar(128) NOT NULL default ''"), 'pwChange' => array('label' => &$GLOBALS['TL_LANG']['tl_user']['pwChange'], 'exclude' => true, 'inputType' => 'checkbox', 'filter' => true, 'sql' => "char(1) NOT NULL default ''"), 'admin' => array('label' => &$GLOBALS['TL_LANG']['tl_user']['admin'], 'exclude' => true, 'inputType' => 'checkbox', 'filter' => true, 'eval' => array('submitOnChange' => true), 'save_callback' => array(array('tl_user', 'checkAdminStatus')), 'sql' => "char(1) NOT NULL default ''"), 'groups' => array('label' => &$GLOBALS['TL_LANG']['tl_user']['groups'], 'exclude' => true, 'filter' => true, 'inputType' => 'checkboxWizard', 'foreignKey' => 'tl_user_group.name', 'eval' => array('multiple' => true), 'sql' => "blob NULL", 'relation' => array('type' => 'belongsToMany', 'load' => 'lazy')), 'inherit' => array('label' => &$GLOBALS['TL_LANG']['tl_user']['inherit'], 'exclude' => true, 'default' => 'group', 'inputType' => 'radio', 'options' => array('group', 'extend', 'custom'), 'reference' => &$GLOBALS['TL_LANG']['tl_user'], 'eval' => array('helpwizard' => true, 'submitOnChange' => true), 'sql' => "varchar(12) NOT NULL default ''"), 'modules' => array('label' => &$GLOBALS['TL_LANG']['tl_user']['modules'], 'exclude' => true, 'filter' => true, 'inputType' => 'checkbox', 'options_callback' => array('tl_user', 'getModules'), 'reference' => &$GLOBALS['TL_LANG']['MOD'], 'eval' => array('multiple' => true, 'helpwizard' => true), 'sql' => "blob NULL"), 'themes' => array('label' => &$GLOBALS['TL_LANG']['tl_user']['themes'], 'exclude' => true, 'inputType' => 'checkbox', 'options' => array('css', 'modules', 'layout', 'image_sizes', 'theme_import', 'theme_export'), 'reference' => &$GLOBALS['TL_LANG']['MOD'], 'eval' => array('multiple' => true), 'sql' => "blob NULL"), 'pagemounts' => array('label' => &$GLOBALS['TL_LANG']['tl_user']['pagemounts'], 'exclude' => true, 'inputType' => 'pageTree', 'eval' => array('multiple' => true, 'fieldType' => 'checkbox'), 'sql' => "blob NULL"), 'alpty' => array('label' => &$GLOBALS['TL_LANG']['tl_user']['alpty'], 'default' => array('regular', 'redirect', 'forward'), 'exclude' => true, 'inputType' => 'checkbox', 'options' => array_keys($GLOBALS['TL_PTY']), 'reference' => &$GLOBALS['TL_LANG']['PTY'], 'eval' => array('multiple' => true, 'helpwizard' => true), 'sql' => "blob NULL"), 'filemounts' => array('label' => &$GLOBALS['TL_LANG']['tl_user']['filemounts'], 'exclude' => true, 'inputType' => 'fileTree', 'eval' => array('multiple' => true, 'fieldType' => 'checkbox'), 'sql' => "blob NULL"), 'fop' => array('label' => &$GLOBALS['TL_LANG']['FOP']['fop'], 'default' => array('f1', 'f2', 'f3'), 'exclude' => true, 'inputType' => 'checkbox', 'options' => array('f1', 'f2', 'f3', 'f4', 'f5', 'f6'), 'reference' => &$GLOBALS['TL_LANG']['FOP'], 'eval' => array('multiple' => true), 'sql' => "blob NULL"), 'imageSizes' => array('label' => &$GLOBALS['TL_LANG']['tl_user']['imageSizes'], 'exclude' => true, 'inputType' => 'checkbox', 'reference' => &$GLOBALS['TL_LANG']['MSC'], 'eval' => array('multiple' => true), 'options_callback' => function () {
    return System::getContainer()->get('contao.image.image_sizes')->getAllOptions();
}, 'sql' => "blob NULL"), 'forms' => array('label' => &$GLOBALS['TL_LANG']['tl_user']['forms'], 'exclude' => true, 'inputType' => 'checkbox', 'foreignKey' => 'tl_form.title', 'eval' => array('multiple' => true), 'sql' => "blob NULL"), 'formp' => array('label' => &$GLOBALS['TL_LANG']['tl_user']['formp'], 'exclude' => true, 'inputType' => 'checkbox', 'options' => array('create', 'delete'), 'reference' => &$GLOBALS['TL_LANG']['MSC'], 'eval' => array('multiple' => true), 'sql' => "blob NULL"), 'disable' => array('label' => &$GLOBALS['TL_LANG']['tl_user']['disable'], 'exclude' => true, 'filter' => true, 'flag' => 2, 'inputType' => 'checkbox', 'save_callback' => array(array('tl_user', 'checkAdminDisable')), 'sql' => "char(1) NOT NULL default ''"), 'start' => array('label' => &$GLOBALS['TL_LANG']['tl_user']['start'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('rgxp' => 'datim', 'datepicker' => true, 'tl_class' => 'w50 wizard'), 'sql' => "varchar(10) NOT NULL default ''"), 'stop' => array('label' => &$GLOBALS['TL_LANG']['tl_user']['stop'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('rgxp' => 'datim', 'datepicker' => true, 'tl_class' => 'w50 wizard'), 'sql' => "varchar(10) NOT NULL default ''"), 'session' => array('label' => &$GLOBALS['TL_LANG']['tl_user']['session'], 'exclude' => true, 'input_field_callback' => array('tl_user', 'sessionField'), 'eval' => array('doNotShow' => true, 'doNotCopy' => true), 'sql' => "blob NULL"), 'dateAdded' => array('label' => &$GLOBALS['TL_LANG']['MSC']['dateAdded'], 'default' => time(), 'sorting' => true, 'flag' => 6, 'eval' => array('rgxp' => 'datim', 'doNotCopy' => true), 'sql' => "int(10) unsigned NOT NULL default '0'"), 'lastLogin' => array('eval' => array('rgxp' => 'datim', 'doNotShow' => true, 'doNotCopy' => true), 'sql' => "int(10) unsigned NOT NULL default '0'"), 'currentLogin' => array('label' => &$GLOBALS['TL_LANG']['MSC']['lastLogin'], 'sorting' => true, 'flag' => 6, 'eval' => array('rgxp' => 'datim', 'doNotCopy' => true), 'sql' => "int(10) unsigned NOT NULL default '0'"), 'loginCount' => array('default' => 3, 'eval' => array('doNotCopy' => true), 'sql' => "smallint(5) unsigned NOT NULL default '3'"), 'locked' => array('eval' => array('rgxp' => 'datim', 'doNotCopy' => true), 'sql' => "int(10) unsigned NOT NULL default '0'")));
/**
 * Provide miscellaneous methods that are used by the data configuration array.
 *
 * @author Leo Feyer <https://github.com/leofeyer>
 */
class tl_user extends Backend
{
    /**
     * Import the back end user object
     */
    public function __construct()
    {