WordPress.org

Ready to get started?Download WordPress

Forums

User Access Manager Auto Assign Groups (1 post)

  1. Faytesp
    Member
    Posted 1 year ago #

    Hello, I am currently trying to develop code for the User Access Manager that would allow users to auto assign groups to users whether through code or by click of a button. I am new to PHP and WordPress though. Has anyone been able to design something similar for UAM that would allow the user to be automatically assigned and unassigned to groups? Looking at the code I believe using the global $userAccessManager would allow me to call the necessary functions to auto assign groups. However, I am unsure how to call this global as it is in a separate directory. From the looks of the code, this global is being called within a sub directory of the root of the main folder for the plugin where the globe appears to be assigned. Does this mean that globals may be referenced from sub directories? Furthermore to use the global in a different directory altogether do I need to include the file the global is defined in or is it better to require_once the file? I plan to create a page template and add the code to it to create the auto assign button. Any advice is appreciated. Thank you for your time.

Topic Closed

This topic has been closed to new replies.

About this Topic