Admin User Authentification Module
The User Authentification Module installer allows you to configure the rights access to the admin items.
It should therefore be installed last, after having created all the elements of the CRUD.
Click the Install User Authentification Module button to launch the installer.
The installer will create the users and the users_profiles tables
You will also have enter the main administrator informations.
The main administrator can then manage users and profiles in the admin panel.
Reinstall / Update the Admin User Authentification Module
If you add some tables to your admin panel after having installed the User Authentification Module you'll have to update the users_profiles table.
For that purpose you have two possibilities:
reinstall with the automatic installer
- Disable the module from the generator
- Uninstall the module from the generator
- Delete admin/secure/install/install.lock from your server
- Launch the installer and follow the process
update with a simple SQL query
When you install / reinstall the authentication module, the users_profiles table used by PHP CRUD Generator to manage user rights is modified. For each table of your database used in the admin panel, 4 fields are created:
- read_table
- update_table
- create_delete_table
- constraint_query_table
Instead of using the automatic installer, you can add the 4 fields with a simple MySQL query.
The result will be exactly the same as using the installer.
Copy / paste the query below into your database management interface (ie: phpmyadmin) to add the 4 fields to the users_profiles table.
Replace users_profiles with your users_profiles table name, which may have a prefix.
Replace _table with your the name of the table that you want to add to the authentication module.
ALTER TABLE `users_profiles`
ADD `read_table` BOOLEAN NOT NULL DEFAULT TRUE AFTER `profile_name`,
ADD `update_table` BOOLEAN NOT NULL DEFAULT TRUE AFTER `read_table`,
ADD `create_delete_table` BOOLEAN NOT NULL DEFAULT TRUE AFTER `update_table`,
ADD `constraint_query_table` VARCHAR(255) NULL DEFAULT NULL AFTER `create_delete_table`;
Changelog
After any update, close & reopen your browser to clear PHP SESSION
version 1.15 (12/2020)
New Features:
- add a new 'html' field type in the generator to show the HTML content in the admin lists instead of HTML code when the fields contain HTML
- auto enable textarea + tinyMce in the generator for HTML fields
Improvements:
- add $mail->Sender in Form.php for PHPMailer to improve email deliverability
- edit the Fileuploader PHP image upload script to crop the images AFTER resizing
- (the original behaviour that center-crops the original image is still available in the file code comments)
- add a default empty value in the admin forms select, radio & checkbox when the field is not required
Bug Fix:
- validator now validates integers with leading zeros (PHP :: Bug #43372)
- fix wrong ajax POST url in the admin search whith paginated results
- fix textarea custom heights in CREATE forms
version 1.14 (11/2020)
New Features:
- add field height option for textarea in the generator
Improvements:
- Accept NULL date / time instead of registering the default '1970-01-01 00:00' timestamp in database
- sanitize directory separator in class/Form.php to avoid wrong plugins url detection on server with inconsistent $_SERVER['SCRIPT_NAME'] and $_SERVER['SCRIPT_FILENAME'] values
- show tinymce and word char count in the generator only for textarea
Bug Fix:
- remove php warning when posting a delete form without choosing yes/no
version 1.13.3 (11/2020)
Improvements:
- improve scrolling behavior in admin nested tables show / hide
Bug Fix:
- fix non-working nested tables show / hide due to the new OverlayScrollbars plugin
version 1.13.2 (11/2020)
Bug Fix:
- replace the deprecated admin table scrollbar plugin broken by the latest jQuery with the great new OverlayScrollbars plugin
version 1.13.1 (11/2020)
New Features:
- new tutorial to customize the admin Home page: https://www.phpcrudgenerator.com/tutorials/how-to-customize-the-bootstrap-admin-homepage
- add documentation to update the Authentication Module with a simple SQL query instead of reinstalling from scratch:
https://www.phpcrudgenerator.com/documentation/index#admin-user-authentification-module
Bug Fix:
- fix a bug in the General Settings Form due to the previous update
version 1.13 (11/2020)
Bug Fix:
- update jQuery to 3.5.1 due to a recent browser bug that prevented the generator forms to submit (nothing happened after clicking the submit button)
version 1.12 (11/2020)
Bug Fix:
- prefill the generator create/update form properly with TinyMce and character counter options & values
- remove php warning when installing the authentication module
- move the generator scripts to the part to avoid jQuery not loaded error in some special circumstances
- change the target table in READ lists nested tables EDIT buttons to the end relationnal table instead of intermediate
- edit class/Utils/isValidTimeStamp function to return true with number entry as well as string
version 1.11 (09/2020)
Improvements:
- trim $url in CrudTwigExtension::ifRemoteFileExists($url) - vendor/twig/twig/src/Extension/CrudTwigExtension.php
- replace "url" property in object classes with "item_url" to avoid conflicts with database fields named "url"
Bug Fix:
- fix php Notice when building single record READ lists
- add empty default value in create / update forms for fields that get their values from a table when no record exist
- fix the filtered columns overlay colored by colorColumns in the admin READ lists
- fix wrong default dates / times in UPDATE forms with the pickadate & material date/time pickers hidden fields
- fix date value with date pickers when a form is posted with errors
- fix the index of the colored columns in READ lists when some filters are active with bulk delete enabled and admin action buttons are on the left
version 1.10 (06/2020)
Improvements:
- add "open url button" link to the documentation in the generator
- better date & time formats management with the material datepicker plugin
(rebuild your create/update forms if you want to benefit from these changes)
Bug Fix:
- fix date and time custom formats with translations in the create / edit forms
- add missing session_start() in ajax bulk delete forms
version 1.9 (06/2020)
New Features:
- add Bulk Delete capabilities to the admin dashboard's data lists
- add date range picker filter to the generator filters options + the admin dashboard's data lists
- add "Default field for search" option to the generator
Improvements:
- improve the generator design consistency
- improve root path detection for servers with inconsistent directory separators
- collapse admin inactive sidebar categories on categorie click
Bug Fix:
- fix Ajax filter results when the result options use 2 field names
version 1.8 (05/2020)
Improvements:
- add timezone to the generator general settings
- update PHP Form Builder to the latest version (4.4)
- upgrade Twig to Twig 3.0 and others vendor libraries for PHP 7.4.x compatibility
- add php DOM extension test in the installer's server capabilities tests
- add a clear error message with a link to the help center on root path detection failure
- add a loading indicator to the auto-updater
Bug Fix:
- fix wrong urls in admin forms when moving the admin files from localhost to the production server
- fix the missing relational values in the exported data
- fix admin login failure after reinstalling the authentication module with changing the user table name
- replace the double quotes with single quotes in the generator delete form template main query
version 1.7.7 (04/2020)
Bug Fix:
- fix stupid ROOT path error with subfolder installations due to the previous update
version 1.7.6 (04/2020)
Improvements:
- add a server test file in the install folder to debug paths & urls
- auto-apply ORDER BY changes from the generator to the admin panel without clearing PHP session
- update ElementFilters to allow simple quotes in advanced filters
Bug Fix:
- fix ROOT path with server alias
version 1.7.5 (04/2020)
New Features:
- add an "Ajax loading" option in the generator READ Lists filters (default: false)
Hint: Enable Ajax loading on all the tables that contain a lot of records
This new option allows to load the filters options on demand and will GREATLY improve the loading speed
- add ORDER BY in the generator READ List main settings
- add website search to https://www.phpcrudgenerator.com documentation, tutorials & help center
- add default skin loader for each Bootstrap admin theme CSS in the general settings form
- add the item name in the admin header h1
- add a footer template for admin READ lists (admin/templates/footer.html)
Improvements:
- cleaner generator design
- add instructions to solve 404 errors on some servers (lightspeed) in the help center + admin/.htaccess
- various minor optimizations
Bug Fix:
- fix Tinymce's Responsive file manager url
- edit the cUrl test file in install/
version 1.7.4 (12/2019)
New Features:
- new setting available to choose to show search results in all on the same page or in a paginated list
IMPORTANT: regenerate your READ lists from the generator if you want the paginated search results
or your paginated results will lead to 404 NOT FOUND
Bug Fix:
- fix nested table records in READ lists with only the primary key displayed
- fix the "add new" button link (previously to 404) in READ lists nested tables with page > 1
- the generator delete form now sets the correct stored options for external tables records
version 1.7.3 (12/2019)
New Features:
- add an "Advanced" section in the tutorials with a new "Date and Time formats management logic tutorial
Bug Fix:
- fix wrong date / time formats in admin READ lists for servers without PHP intl extension in some random cases depending on the chosen format
- fix date / time format dropdown helpers in the generator
version 1.7.2 (11/2019)
Improvements:
- add Czech translation
- improve documentation
Bug Fix:
- fix PHP warnings with forms & array values
- fix error in general settings form when no logo is registered
- fix filters query with number values & MySQL 5.7+
- fix error in the Italian translation
- fix PHP warning caused by primary keys aliases in the admin READ lists external relations
version 1.7.1 (08/2019)
Bug Fix:
- Fix the Admin Dropdown Search field cross-browser compatibility
(rebuild your lists to apply)
version 1.7 (08/2019)
New Features:
- New live search with Ajax Autocomplete for Bootstrap Admin Panel READ lists
(rebuild your lists to apply)
Improvements:
- Update Material Pickers for compatibility
version 1.6.1 (07/2019)
New Features:
- Admin filters now can deal with JSON array values (select multiple, checkboxes)
- New PHP CRUD Generator Tutorials channel on Youtube
Improvements:
- Array values from database now displayed as comma-separated values instead of raw JSON
- improve the online Documentation & Tutorials
Bug Fix:
- Rewrite code to limit users rights to their own records
(rebuild your lists / forms to apply)
version 1.6 (06/2019)
New Features:
- 20+ new Bootstrap themes are now available
- Choose your preferred Bootstrap theme from the General Settings form
- Customize all the main layout Bootstrap CSS classes from the General Settings form
- Compile the SASS files with Gulp using the new PHP CRUD Generator Gulp Github repository
- New tutorial for Admin Theming & CSS: https://www.phpcrudgenerator.com/tutorials/how-to-customize-the-bootstrap-admin-panel-css
Bug Fix:
- Great, no known bug!
version 1.5.6 (06/2019)
Improvements:
- The General Settings form in the generator now allows to change the Bootstrap admin main body class
Bug Fix:
- the installer was broken by the previous changes. Solved now.
- Edit in place is no more available in Admin READ lists for users with insufficient rights
- the broken "enable/disable" authentication module in the Generator now works again
version 1.5.5 (06/2019)
New Features:
- The date & Time pickers languages can now be defined in the General Settings form
- You can now choose the style of the Bootstrap admin date & Time pickers
(default | Material Design)
- New Italian translation - Many thanks to Alberto
version 1.5.4 (06/2019)
New Features:
- New General Settings form available in the Generator
- The action buttons of the Bootstrap Admin panel can now be on the left or right of the table
- The filters of the Bootstrap Admin panel can now be triggered automatically when selected
- You can change the site title and admin logo using the General Settings form
- You can change the admin language using the General Settings form
- You can change the admin skin using the General Settings form
Improvements:
- Show custom table names in Admin READ lists nested tables
Bug Fix:
- The Validation button in the Generator should now never overlap the forms
version 1.5.3 (06/2019)
New Features:
- Action buttons in the admin panel can now be displayed in the
1st column of the admin READ lists
Improvements:
- Responsive & others in admin CSS
Bug Fix:
- datepicker plugin
- files & images upload
- tooltips
(these bugs were due to the previous update with latest PHP Form Builder)
version 1.5.2 (05/2019)
Bug Fix:
- fix sorting buttons in admin panel READ lists
version 1.5.1 (05/2019)
Bug Fix:
- fix export to excel/csv in admin panel
version 1.5 (05/2019)
New Features:
- replace PHP Form Builder with the latest version 4.2.1
Improvements:
- Admin Panel Fast Loading optimization with the new LoadJS features
- PHP CRUD Fast Loading optimization with the new LoadJS features
- rewrite queries for admin restricted users rights
- upgrade Bootstrap to the latest version 4.3.1
- minor various others improvements
version 1.4.9 (05/2019)
New Features:
- add new Export features (print - current view - all records) in admin READ lists
version 1.4.8 (02/2019)
New Features:
Improvements:
- add (very) strong protection for fileuploader plugin uploads
Bug Fix:
- remove some PHP warnings
- solved admin sidebar duplicate items issue
version 1.4.7 (02/2019)
Bug Fix:
- fix navbar issue with empty icons
version 1.4.6 (02/2019)
New Features:
- New "array" field type in generator for checkboxes & select multiple values
will show JSON decoded values in the READ lists
Improvements:
- better admin navbar content management ("Organize Navbar")
- improve array values management in the generator
Bug Fix:
- fix non-working select multiple with "set" & "enum" field types
- fix changelog url in auto-update success message
version 1.4.5 (02/2019)
New Features:
- License system now accepts domain with multiple extensions
ie: domain.com, domain.eu, domain.co.uk are all valid with the same license.
- New button in the Generator to reload fresh database structure
(When you add or remove tables)
Improvements:
Bug Fix:
- admin filters now accept zero values
- fix queries in admin lists on external tables with direct relation (no intermediate table)
version 1.4.4 (02/2019)
New Features:
- external records from relational tables can now be managed
from the READ LISTS & the CREATE/UPDATE forms (!)
- add self-referential foreign keys management
- tables can now be removed/re-enabled from the admin navbar
- add Spanish admin translation (Thanks to Sergio)
Improvements:
- export buttons (csv/xls[x]) now export the exact filtered list items
- align single fields on the left in admin panels
Bug Fix:
- remove phone validation in auth. module installer
- logout from generator/generator.php now does its job as intended
- upgrade PHPMailer to latest 6.0.6 to fix PHP 7.3 warnings
version 1.4.3 (12/2018)
Bug Fix:
- fix inverted label & value in form CREATE/EDIT templates
- protect relation tables SELECT queries in form CREATE/EDIT templates
version 1.4.2 (10/2018)
New Features:
- new "Add New" button in admin READ lists on external nested tables even if no record
Improvements:
- ADMIN panel: register URL query parameters in $_GET (Altorouter ROUTES doesn't deal with these).
- the ADMIN ADD & UPDATE forms now redirect to the correct list if we come from a nested table (external relation)
- move date_default_timezone_set from conf/conf.php to conf/user-conf.php
- add Help & instructions for Microsoft IIS & NGINX servers
Bug Fix:
- "Add New" button in admin READ lists now always targets the right CREATE form
even if there's several external nested tables in the list.
- Fix several warnings & minor issues
version 1.4.1 (10/2018)
New Features:
- add "Add New", "Edit" & "Delete" buttons in READ Lists nested tables for external tables records
Improvements:
- add compatibility for date & time without PHP intl extension
Bug Fix:
- definitely fix the Apache mod_security error on the install process with some misconfigured servers
version 1.4 (10/2018)
Warning: If you admin READ lists have date or datetime fields, open the corresponding templates in /admin/templates
, find the functions toDate(...)
and replace the date PHP format with the corresponding ICU date format.
new online PHP CRUD Tutorials
New Features:
- PHPCG includes now the complete latest PHP Form Builder version with all its features & plugins.
- Add the online knowledge base with numerous tutorials & videos
Improvements:
- improve date & time translations management - https://www.phpcrudgenerator.com/tutorials/how-to-translate-dates-times-in-admin-panel
- add full date & time translation in admin lists & forms
- change admin form action from absolute url to root relative url
- add install/curl-test.php to help with CURL debbuging
Bug Fix:
- the generator now retrieves the correct stored values to be displayed in READ lists for the external fields
- get the correct time value in admin edit forms with datetime fields
- solve plugins URL detection with paths containing uppercase letters
version 1.3.2 (08/2018)
Improvements:
- dates edit in place now get the current field value
- image now crop from the center
Bug Fix:
- fix missing fields in update forms due to previous update error
- fix admin lists bug with fields having uppercase characters
- fix admin edit in place with dates & uppercase table name
version 1.3.1 (08/2018)
Improvements:
Bug Fix:
- fix Generator form create profiles
version 1.3 (08/2018)
Notes:
- After this update you may have to reinstall the user authentification module from the Generator page.
Improvements:
- update server-side validation functions to accept empty values,
except for the validators whose internal logic make values required.
Details available here: https://www.phpformbuilder.pro/documentation/class-doc.html#php-validation-methods
- the User Authentification Module now keeps the users & users profiles tables and records when uninstalling.
- the User Authentification Module can now be reinstalled even if the users & users profiles table exist
- improve user profiles management and rights limitations
- the users rights changes now take effect without clearing the session
- the admin sidebar doesn't show empty categories anymore
- the only required fields in users table are now name, firstname, profile ID, email, pass & active
(takes effect on new User Authentification Module installs only)
- add simulate property to Generator.php to simulate when we reset a table structure from generator
- remove several warnings & improve various feedback messages
Bug Fix:
- solve problem with updates & SSL errors on misconfigured servers
version 1.2.4 (07/2018)
Notes:
- After this update you may have to reinstall the user authentification module from the Generator page.
Improvements:
- set default empty value for passwords in UPDATE FORMS
Bug Fix:
- solve CREATE/UPDATE forms generation with custom validation
- solve READ LISTS generation with advanced filders
- solve image path in admin when the field thumbs are not enabled
- remove password validation in UPDATE FORMS if posted value is empty
- correct select values count in generator CREATE/UPDATE forms with custom values
- solve error 500 when adding new users
version 1.2.3 (07/2018)
New Features:
- add an uninstallation process
- add a login module for the generator on the production server
- primary key management in admin forms
Improvements:
- remove the "select database" form in generator & auto select the correct database
- add warnings for non-standard tables & field names (hyphenated)
- improve password fields management in CREATE/UPDATE forms:
better password encryption with Secure class
password are now automatically optional on update forms with an helper text: "Leave blank to keep the current password"
- turn fileuploader debug on for CREATE/UPDATE forms
- improve documentation
- improve auto-validation detection according to forms & database field types
Bug Fix:
- revert Twig template engine to version 1.35.4 to preserve PHP < 7.0 compatibility
- regenerate css & js combined plugin files for CREATE/UPDATE forms when the forms are edited with the generator
- fix generator which failed to validate when custom validators were selected while generating the CREATE/UPDATE forms
- fix password encryption when changes are made in CREATE/UPDATE users table
version 1.2.2 (07/2018)
Improvements:
- add user-conf file to avoid breaking user custom settings with updates
- move the install folder outside the generator folder.
- improve the updater script
- improve url & path management
Bug Fix:
- fix server issues in some special configurations
version 1.2.1 (07/2018)
Warning: if your authentification module is not enabled, after the update open php-crud-generator/conf/admin-lock.php
and set ADMIN_LOCKED
to false
.
Improvements:
- move ADMIN_LOCKED and ADMIN_LOGO to separate files for easier updates
Bug Fix:
- fix several minor bugs
version 1.2 (06/2018)
Bug Fix:
- fix authentification module installation (wrong users filters)
version 1.1 (06/2018)
New Features:
- add File uploader to Generator + Admin panel
- add version check & auto-updater
Improvements:
- update dependencies & move to vendor with Composer
- improve ROOT path analysis
Bug Fix:
- correct date & time validation
- correct value/display inversion with live-edit custom select
version 1.0 (06/2018)
First Release