[EAE Add-ons] Roles

[EAE Add-ons] Roles 1.0.1

No permission to download

Lee

Well-known member
Hi Lawrence, when trying to view the member roles page under the members tab I am greeted with this error:

XF\Db\InvalidQueryException: MySQL statement prepare error [1064]: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')' at line 4 in src/XF/Db/AbstractStatement.php at line 228
  1. XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 196
  2. XF\Db\Mysqli\Statement->getException() in src/XF/Db/Mysqli/Statement.php at line 39
  3. XF\Db\Mysqli\Statement->prepare() in src/XF/Db/Mysqli/Statement.php at line 54
  4. XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.php at line 94
  5. XF\Db\AbstractAdapter->query() in src/XF/Mvc/Entity/Finder.php at line 1379
  6. XF\Mvc\Entity\Finder->fetch() in src/addons/EAEAddons/Roles/ControllerPlugin/RolesList.php at line 17
  7. EAEAddons\Roles\ControllerPlugin\RolesList->getRolesListData() in src/addons/EAEAddons/Roles/XF/Pub/Controller/Member.php at line 17
  8. EAEAddons\Roles\XF\Pub\Controller\Member->actionRoles() in src/XF/Mvc/Dispatcher.php at line 350
  9. XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 261
  10. XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 113
  11. XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 55
  12. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2298
  13. XF\App->run() in src/XF.php at line 464
  14. XF::runApp() in index.php at line 20
 

Lawrence

Well-known member
Hi Lawrence, when trying to view the member roles page under the members tab I am greeted with this error:
Good day @Lee, I'll take a look into this shortly. I just got back from a weekend on the lake in a tiny house, hence my delayed response.

Stay safe, Lawrence
 

Lawrence

Well-known member
I can't reproduce this as of yet. Here is the query that is generated using my selected secondary user groups, maybe @Ozzy47 or @TickTackk's eyes can spot something mine can't, that mariaDB doesn't like (?), :)

SQL:
SELECT `xf_user`.*, `xf_user_profile_Profile_1`.*
FROM `xf_user`
LEFT JOIN `xf_user_profile` AS `xf_user_profile_Profile_1` ON (`xf_user_profile_Profile_1`.`user_id` = `xf_user`.`user_id`)
WHERE (`xf_user`.`last_activity` > 1567957699) AND (`xf_user`.`is_banned` = 0) AND (`xf_user`.`user_state` = 'valid') AND (FIND_IN_SET('3', `xf_user`.`secondary_group_ids`) OR FIND_IN_SET('6', `xf_user`.`secondary_group_ids`) OR FIND_IN_SET('9', `xf_user`.`secondary_group_ids`) OR FIND_IN_SET('4', `xf_user`.`secondary_group_ids`) OR FIND_IN_SET('7', `xf_user`.`secondary_group_ids`))
 

Lee

Well-known member
I can't reproduce this as of yet. Here is the query that is generated using my selected secondary user groups, maybe @Ozzy47 or @TickTackk's eyes can spot something mine can't, that mariaDB doesn't like (?), :)

SQL:
SELECT `xf_user`.*, `xf_user_profile_Profile_1`.*
FROM `xf_user`
LEFT JOIN `xf_user_profile` AS `xf_user_profile_Profile_1` ON (`xf_user_profile_Profile_1`.`user_id` = `xf_user`.`user_id`)
WHERE (`xf_user`.`last_activity` > 1567957699) AND (`xf_user`.`is_banned` = 0) AND (`xf_user`.`user_state` = 'valid') AND (FIND_IN_SET('3', `xf_user`.`secondary_group_ids`) OR FIND_IN_SET('6', `xf_user`.`secondary_group_ids`) OR FIND_IN_SET('9', `xf_user`.`secondary_group_ids`) OR FIND_IN_SET('4', `xf_user`.`secondary_group_ids`) OR FIND_IN_SET('7', `xf_user`.`secondary_group_ids`))
It happens if you view the member Roles page before assigning any groups to Roles. So the query would result in 0 results.
 

Lee

Well-known member
Im in the process of modifying the templates a little to show some extra info, so far - the about me.

Some styling still to do :)

Annotation 2020-09-07 172659.png
 

Lawrence

Well-known member
No worries, its not a show stopper but I guess it needs fixing!

I have it fixed now. Seems (not seems, lol, is) with all the testing I did with this add-on before I released it, I forgot to test it with no user groups selected... 🥵. Now, when no user groups are selected, it just shows a no users found message.

Im in the process of modifying the templates a little to show some extra info, so far - the about me.

Some styling still to do :)

View attachment 234471

What a great idea. I'll add some options to select what extras to be displayed for the next major release.
 
  • Like
Reactions: Lee

Lawrence

Well-known member
Speaking of styling, I'm finishing up the style properties for our newest add-on, ug (then all that is left are widgets, :) ).
 

Lawrence

Well-known member
For some reason I have the roles across the top of the post, and not below the Avatar. Any idea how I can adjust this?

Thanks.

View attachment 240395

There is no option to display roles below the avatar on the posters info block. I'm not sure if I will add that as an option or not. By the amount of roles your member has in the screenshot, you may want to display only thread starter there (or de-select some user groups in the options), and let the roles page display all the users roles.
 
Sorry, my mistake. I saw the screenshots in the Overview (staff member, developer, etc) and I thought that's what this addon on did. I was looking for something that placed roles (or groups) below the avatar.

Thanks.

P.S. I just assigned the user in my screenshot all those roles to test the addon, it's not an actual scenario.


xx.JPG

EDIT: I just learned that what I was looking for was "banners". Thanks.
 
Last edited:
Top