User Access Manager: Make it compatible to Advanced Access Manager (AAM)

For a new project, i need to use Advanced Access Manager (http://wpaam.com/, https://wordpress.org/plugins/advanced-access-manager/) to add custom user roles to wordpress, as well as User Access Manager(http://www.gm-alex.de/projects/wordpress/plugins/user-access-manager, https://wordpress.org/plugins/user-access-manager/), which gives me the option to restrict access to pages/posts to specific user roles.

I couldn’t get it to work, until i noticed that AAM saved the custom roles as something like „aamrole_542a55374728e“, while UAM saved the role a post was restricted to only with the first 11 letters, so like „aamrole_542“. Looking into the database, i found that UAM creates a new datatable which stores the relations of objects like user roles and the access they get, but the object_id field is only 11 characters big. So the user roles created by AAM couldn’t be saved correctly, resulting in denying access where access should have been possible.

To solve this problem, you open your WordPress Database with a tool like phpMyAdmin, navigate to the table wp_uam_accessgroup_to_object, and change the field ‚object_id‘ to be bigger, like 50 characters. Again, if you don’t know what you are doing, DON’T DO IT!

To Alexander, the guy who wrote the plugin: Please change line 225 in the file UserAccessManager.class.php from

object_id VARCHAR(11) NOT NULL,

to

object_id VARCHAR(50) NOT NULL,

that will make things easier ^^

Happy Coding,
Kuchenundkakao

2 Gedanken zu „User Access Manager: Make it compatible to Advanced Access Manager (AAM)

  1. I don’t get the impression that GM-Alex is supporting UAM and longer… lots of issues posted with no response… also his support site is no longer active (404 error)

Schreibe einen Kommentar

Trage deine Daten unten ein oder klicke ein Icon um dich einzuloggen:

WordPress.com-Logo

Du kommentierst mit Deinem WordPress.com-Konto. Abmelden / Ändern )

Twitter-Bild

Du kommentierst mit Deinem Twitter-Konto. Abmelden / Ändern )

Facebook-Foto

Du kommentierst mit Deinem Facebook-Konto. Abmelden / Ändern )

Google+ Foto

Du kommentierst mit Deinem Google+-Konto. Abmelden / Ändern )

Verbinde mit %s