Forum Discussion
Claudius
10 years agoBoss
Thanks for sharing the code. I'm also curious which page you added this component on. Header? Certain board/topic? or user profile?
Also it feels like there are many unneccessary role assignment calls in here. e.g. if a user has 32 solutions on a board all the if clauses for the "lower" unlocks will trigger as well:
<#if (userSolutions >= 10) && has_Sol_board2_10 == "false"> <#assign result = restadmin("/roles/name/has_Sol_board2_10/users/add?role.user=id/${user.id}") /></#if>
No? Or will selfRole.name return correctly for user profiles with multiple roles?
Related Content
- 10 months ago
- 10 months ago
- 10 months ago
- 10 months ago
- 8 months ago