2011-04-10, 12:04:58
Multi User plugin
Click Here To Download From Extend
View GitHub Repos.
It has the following functionality:
Edit User:
You are able to edit all the options for each user, including permissions.
Add User:
You are able to add a new user and set permissions
Permissions:
You can block certain features and areas for each individual user.
This includes removing the items from the navigation, as well as blocking access to the area/item if the user tries to access it directly.
The Following Areas Can Be Blocked Using The Permissions:
I created a function, which other plugins can use, that will add a permissions checkbox onto the manage users page. Example below:
The above code (placed in my GS Blog plugin) will add a checkbox on the manage users page with the label of Blog Settings. It will save it to the users xml file in the node "blogsettings".
Below is a screenshot of the effect of adding that function and a few other permissions:
Now that the data is stored in the users xml file, the plugin author can access that by manually loading the xml file or by using a function the multi user plugin provides. Example Below:
The above (check_user_permission()) will return false if the page is blocked or true if the page is not blocked or the node is missing from the users xml file.
The above (check_user_permissions()) function will return an array of all permissions in the following format:
'permissionname'=>bool
Plugin Screenshots Below:
User Management Screen:
Edit User:
Add User:
Changes & Versions:
Version 1.1 (4/11/2011)
- Links in Admin Panel footer will now be hidden based on permissions set
- Added 'Disable Admin Access' Checkbox:
- If Checked, the user will not be able to manage users or access the 'user management' screen.
- Added 'Custom Landing Page' dropdown:
- The ability to select an alternate landing page the user will land on after login (useful if 'pages' is disabled)
- Language files installed will automatically show up in the 'Language' dropdown
- Cleaned up jquery using Chris's suggestion
Important Change To Note:
I have rearranged the xml file (Taking Chris's Suggestion) by putting all of the permissions in <permissions></permissions>
This means that if you have already used the multi user plugin, and you installed version 1.1, you will need to reset the permissions by editing the users.
Version 1.4 (12/15/2011)
- Fixed "Manage User" Form In All Versions Of IE - Previously clicking the "Edit" link for a user crashed IE
- Fixed Occasional Error That Occurred When Resetting Password From Front End
- Re-Coded Entire Plugin For Easier Future Updating & Community Collaboration
- Added "Update This Plugin" Button Which Will Update The Plugin To The Newest Version In Extend
- Fixed Problem With Settings Page
Previously changing the password from the settings page would overwrite permissions.
Click Here To Learn More About This Fix
- Various Other Changes And Improvements
Version 1.5 (2012-03-27)
Version 1.6 (2012-06-01)
Version 1.7 (2012-06-01)
For some reason Get Simple does not use the SimpleXMLExtended class and instead uses SimpleXMLElement to save the user file.
Because of this the CDATA is removed from the bio node in the users xml file if a user save data from the settings page. This might be a problem if certain special characters are used in the editor. We shall see.
Version 1.8.2 (9-21-2012)
This was my first plugin so let me know if anyone catches any bugs or mistakes.
Click Here To Download From Extend
View GitHub Repos.
It has the following functionality:
Edit User:
You are able to edit all the options for each user, including permissions.
Add User:
You are able to add a new user and set permissions
Permissions:
You can block certain features and areas for each individual user.
This includes removing the items from the navigation, as well as blocking access to the area/item if the user tries to access it directly.
The Following Areas Can Be Blocked Using The Permissions:
- Pages
- Files
- Theme
- Plugins
- Backups
- Settings
- Support
- Edit
I created a function, which other plugins can use, that will add a permissions checkbox onto the manage users page. Example below:
Code:
<?php add_mu_permission('blogsettings', 'Blog Settings'); ?>
Below is a screenshot of the effect of adding that function and a few other permissions:
Now that the data is stored in the users xml file, the plugin author can access that by manually loading the xml file or by using a function the multi user plugin provides. Example Below:
Code:
<?php check_user_permission($username, $permission_node); ?>
<?php check_user_permissions($username); ?>
The above (check_user_permissions()) function will return an array of all permissions in the following format:
'permissionname'=>bool
Plugin Screenshots Below:
User Management Screen:
Edit User:
Add User:
Changes & Versions:
Version 1.1 (4/11/2011)
- Links in Admin Panel footer will now be hidden based on permissions set
- Added 'Disable Admin Access' Checkbox:
- If Checked, the user will not be able to manage users or access the 'user management' screen.
- Added 'Custom Landing Page' dropdown:
- The ability to select an alternate landing page the user will land on after login (useful if 'pages' is disabled)
- Language files installed will automatically show up in the 'Language' dropdown
- Cleaned up jquery using Chris's suggestion
Important Change To Note:
I have rearranged the xml file (Taking Chris's Suggestion) by putting all of the permissions in <permissions></permissions>
This means that if you have already used the multi user plugin, and you installed version 1.1, you will need to reset the permissions by editing the users.
Version 1.4 (12/15/2011)
- Fixed "Manage User" Form In All Versions Of IE - Previously clicking the "Edit" link for a user crashed IE
- Fixed Occasional Error That Occurred When Resetting Password From Front End
- Re-Coded Entire Plugin For Easier Future Updating & Community Collaboration
- Added "Update This Plugin" Button Which Will Update The Plugin To The Newest Version In Extend
- Fixed Problem With Settings Page
Previously changing the password from the settings page would overwrite permissions.
Click Here To Learn More About This Fix
- Various Other Changes And Improvements
Version 1.5 (2012-03-27)
- Removed "no" text being which was displaying if the settings page was blocked.
Version 1.6 (2012-06-01)
- Added localization. Includes en_US and en_IT language files
- Fixed bug where clicking update updated the plugin regardless of if "cancel" was pressed or not.
Version 1.7 (2012-06-01)
- Added ability to give users names and bios.
- Allows users to change their own bio and display name from settings page
For some reason Get Simple does not use the SimpleXMLExtended class and instead uses SimpleXMLElement to save the user file.
Because of this the CDATA is removed from the bio node in the users xml file if a user save data from the settings page. This might be a problem if certain special characters are used in the editor. We shall see.
Version 1.8.2 (9-21-2012)
- Added check_user_permissions() function - This function returns all
permissions in an array for the provided user
- Fixed issue with custom permissions being reset if admin settings form
is submitted
This was my first plugin so let me know if anyone catches any bugs or mistakes.