User Adds Admin — manual creation new users from admin panel
The User Adds Admin plugin provides a convenient tool for administrators to manually create new users directly from the Cotonti admin panel. It allows filling in all standard profile fields, assigning a primary group and additional groups
The User Adds Admin plugin provides a convenient tool for administrators to manually create new users directly from the Cotonti admin panel. It allows filling in all standard profile fields, assigning a primary group and additional groups, and populating extrafields without leaving the admin interface.
The plugin also includes a tab with a list of existing users, including filtering and viewing basic information about them.
The plugin works only with standard Cotonti tables (cot_users, cot_groups_users) and does not modify the database structure.
Key features
Two-tab interface: user list and user creation.
Viewing the user list with filters by name, email, ID, primary group, and category (if usercategories is active).
Summary statistics: total number of users and count by groups.
New user creation form with the following fields:
Username
Email
Password and password confirmation
Primary group
Additional groups (checkboxes)
Country
Timezone
Gender
Birth date
Ban until (date/time)
Hide email
Theme
Language
Extra fields, if registered in the system
Validation of entered data (username/email uniqueness, password length, email format, password match).
Use of the standard cot_add_user() function from the users module for correct user creation.
Support for the usercategories plugin for category-based filtering.
Hooks for extending functionality.
File and folder structure
plugins/
└── usersaddsadmin/
├── usersaddsadmin.setup.php // Setup file (metadata and settings)
├── usersaddsadmin.global.php // Global hook (compatibility stub)
├── usersaddsadmin.admin.php // Main admin panel file
├── inc/
│ └── usersaddsadmin.functions.php // Helper functions
├── lang/
│ ├── usersaddsadmin.ru.lang.php // Russian language file
│ └── usersaddsadmin.en.lang.php // English language file
└── tpl/
└── usersaddsadmin.admin.tpl // Admin panel template (XTemplate)
File descriptions
usersaddsadmin.setup.php Contains plugin metadata: code (usersaddsadmin), name, category, description, version, author, license, requirements (users module), recommendations (usercategories). Also contains the setting: perpage (number of users per page).
usersaddsadmin.global.php Loaded globally via the global hook. Serves as a stub to ensure the plugin is correctly registered in the system.
usersaddsadmin.admin.php The main admin panel script (hook tools). Handles both tabs:
list — user list with filters and statistics;
create — new user creation form.
Performs all business logic: data extraction, validation, user creation via cot_add_user(), processing additional groups and extrafields, and redirects.
inc/usersaddsadmin.functions.php Helper function cot_usersaddsadmin_usercategories_select() that builds an HTML select of user categories for the list tab filter (if the usercategories plugin is active).
lang/usersaddsadmin.ru.lang.php Russian language file: all interface strings, field labels, messages.
lang/usersaddsadmin.en.lang.php English language file.
tpl/usersaddsadmin.admin.tpl Admin panel template on XTemplate. Defines the layout of both tabs: filter form, user table, statistics, and user creation form.
Installation
Copy the usersaddsadmin folder to the plugins/ directory of your Cotonti site.
Log in to the Cotonti admin panel.
Go to Extensions.
Find User Adds Admin and click Install.
If necessary, configure the perpage setting (number of users per page in the list).
A link to the plugin will appear in the administration menu (Administration → User Adds Admin).
Plugin interface
After opening the plugin, two tabs are displayed:
User List — viewing and filtering existing users, statistics.
Create User — a form for manually adding a new user.
Switching between tabs is done via navigation tabs at the top of the page.
User List tab
On this tab, the administrator can view the list of users and apply filters to find the necessary records.
Filters
Search — text field; the search area is selected with a switch:
Name — search by user_name.
Email — search by user_email.
Name and Email — search by both fields.
User ID — exact filter by numeric identifier.
Group — selection of the user’s primary group (user_maingrp). The list of groups is taken from the cot_groups table.
Category — filter by user category if the usercategories plugin is active. The user_cats field is used (categories are stored comma-separated). All subcategories of the selected category are included in the filter.
Statistics
Summary information is displayed above the table:
Total users — the total number of records in the cot_users table.
Count by groups — for each group, the number of users for whom it is the primary group is displayed.
Users table
The table contains the following columns:
ID — user identifier.
Name — username, linked to the public profile (opens in a new tab).
Email — email address.
Group — primary group name.
Registration date — formatted registration date.
Ban until — shows “Yes” if the user is banned (the ban period has not expired), otherwise “No”.
Pagination is available below the table.
Create User tab
This tab contains a form for manually adding a new user. All fields available for filling correspond to the standard fields of the cot_users table and additional fields (if they are registered).
Form fields
DB field
Name
Element type
Note
user_name
Name
Text field
Required, minimum 2 characters
user_email
Email
Text field
Required, valid email
user_password
Password
Password field
Required, minimum 4 characters
—
Repeat password
Password field
Must match the password
user_maingrp
Primary group
Dropdown
Groups except guests, inactive, and banned
—
Additional groups
Checkboxes
Select groups to which the user will also be added
user_country
Country
Dropdown
user_timezone
Timezone
Dropdown
Default from system settings
user_gender
Gender
Dropdown
user_birthdate
Birth date
Dropdowns (year/month/day)
Empty value saved as NULL
user_banexpire
Ban until
Date/time dropdowns
Empty = 0
user_hideemail
Hide email
Yes/No switch
Default “Yes”
user_theme
Theme
Dropdown (theme:scheme)
user_lang
Language
Dropdown
Default from system settings
extrafields
Extra fields
According to field type
Displayed if extrafields are enabled
Fields that are not displayed in the form and are set automatically when creating a user: user_regdate, user_lastlog, user_lastvisit, user_lastip, user_logcount, user_sid, user_sidtime, user_lostpass, user_auth, user_token, user_passsalt, user_passfunc. Some of them are filled by the cot_add_user() function.
Data validation
Before creating the user, the following checks are performed:
The username does not contain forbidden characters (<, >, #, ', ", /) and is at least 2 characters long.
The password is at least 4 characters long.
The email has a valid format.
The username is unique (does not exist in cot_users).
The email is unique if email duplicates are disabled in Cotonti settings (useremailduplicate).
The password and password confirmation match.
The birth date cannot be in the future.
If errors are found, the user remains on the form with error messages displayed and entered values retained (except for the password).
Submit handling
When the form is submitted, cot_shield_protect() is triggered.
Data is extracted using cot_import().
Validation is performed.
If there are no errors, the standard function cot_add_user($ruser, null, null, null, $ruser['user_maingrp'], false) is called, which:
hashes the password with a salt;
sets the primary group;
adds a record to cot_users;
adds a relation to cot_groups_users;
sets default values for service fields.
After successful user creation:
additional groups (checkboxes) are processed — records are added to cot_groups_users;
cot_extrafield_movefiles() is called to move uploaded files (if any);
a success message is displayed;
a redirect to the “User List” tab is performed.
If creation fails (for example, cot_add_user returned false), an error is displayed.
Working with extrafields
The plugin fully supports standard Cotonti user extrafields registered in the cot_users table.
On the user creation tab, each extrafield is rendered with the appropriate input type (text, textarea, select, radio, checkbox, file, etc.) using the cot_build_extrafields() function.
Extrafield values are passed to cot_add_user() inside the $ruser array, ensuring they are saved correctly.
Files uploaded through extrafield fields are moved to the appropriate directories after user creation using cot_extrafield_movefiles().
If validation errors occur, extrafield values are restored for re-display.
Integration with usercategories
If the usercategories plugin is installed and active, a category filter appears on the “User List” tab.
Categories are taken from Cot::$structure['usercategories'].
The filter respects the category blacklist configured in usercategories (the usercategoriesblacktreecatspage parameter).
The selected category includes all its subcategories (cot_structure_children() is used).
The search is performed by the user_cats field, where categories are stored comma-separated.
Hooks for developers
The plugin provides several hooks for extending functionality:
usersaddsadmin.add.validate Called after standard validation of the user creation form but before the cot_error_found() check. Allows adding custom validations.
usersaddsadmin.add.done Called after successful user creation and addition of additional groups. Suitable for performing extra actions (for example, writing to your own tables).
usersaddsadmin.tags Called at the end of processing the user creation tab before template rendering. Allows adding custom tags to the template.
Plugin settings
The plugin has one setting:
perpage — number of users per page in the list (default 20).
Frequently asked questions
Can I create users with the super administrator role?
Yes, the primary group can be selected from the list of available groups (except guests, inactive, and banned). If you have administrator rights, you can assign any group, including administrators.
What happens if the email is already in use?
If email duplicates are disabled in Cotonti settings (useremailduplicate is off), creation will be blocked with a corresponding error. If duplicates are allowed, the user will be created.
Are additional user fields supported?
Yes, the plugin automatically renders all registered extrafields for the cot_users table and saves them when creating the user.
Can I specify additional groups besides the primary one?
Yes, a list of checkboxes for all available groups is displayed below the primary group. Selected groups will be added to the cot_groups_users table.
Where does the redirect go after creation?
After successful creation, a redirect is performed to the “User List” tab, where the new user can be seen (sorted by descending ID, so they will be first).
Which fields cannot be set through this form?
The form does not allow setting the registration date, login count, last IP, last visit, last login, and other service fields. They are set automatically by the system when the user is created.
Conclusion
The User Adds Admin plugin is a convenient tool for Cotonti administrators that simplifies manual creation of new users with full control over all profile fields. It combines a filterable user list with a complete creation form, using standard Cotonti mechanisms. Thanks to extrafield support and hooks, the plugin can be easily adapted to specific tasks.
Buy User Adds Admin — manual creation new users from admin panel at low prices. Online store offers to order User Adds Admin — manual creation new users from admin panel, view full description, detailed specifications, product photos and current prices with discounts
Support and development of web projects on the CMF Cotonti: private messengers via the website, open and closed small social networks, trading platforms and marketplaces, freelance and services exchange portal, catalogs of goods from wholesale suppliers, dropshipping platforms, online stores, and much more.
CMS, Script and Engine for an online storefront, infoproduct shop and digital goods store. Different prices in different currencies. Online cryptocurrency payments for goods and services.