6
The proposed script sets the USER_IS_ADMIN to 1 if the user has admin rights of the module identified by the directory name (yourmoduledir in the example, but to be replaced with the real directory name of your module).
If you want a list of all users with admin rights of your module, then you have to look up the the users group id (gperm_groupid) for your module id (gperm_modid) with 'module_admin' in the rights field (gperm_name) in table xoops_group_permission. Depending of the modules one or more item id's (eg. categories) may be present. All user id of this group id can then be found in table xoops_groups_users_link.