Forum breadcrumbs – You are here:Asgaros Support ForumSupportUser Group Metadata
Please or Register to create posts and topics.

User Group Metadata

My registration page is built with Gravity Forms. I want to be able to choose a user group from the registration page using the user group metadata and a drop down custom field. Does anybody know what the metadata is so I can accomplish this?

Hello gogrw,

the name of the usergroup-taxonomy is: asgarosforum-usergroup

There are also a couple of functions in the AsgarosForumUserGroups class you can use:

// Returns all usergroups.
public static function getUserGroups();

// Returns usergroup by id/slug/name/term_taxonomy_id.
public static function getUserGroupBy($value, $by = 'id');

// Returns color of usergroup.
public static function getUserGroupColor($term_id);

// Returns usergroups of user.
public static function getUserGroupsForUser($user_id, $fields = 'all');

// Returns users in usergroup.
public static function getUsersInUserGroup($usergroup_id);

// Counts users in usergroup.
public static function countUsersInUserGroup($usergroup_id);

// Checks if a user is in a specific user group.
public static function isUserInUserGroup($userID, $userGroupID);

In your case the following function could be interesting:

$allGroups = AsgarosForumUserGroups::getUserGroups();

 

If you want to support the development of Asgaros Forum, you can leave a good review or donate. Thank you very much!

Thank you!