1
minahito
$xoops_isadmin Logic bug?
  • 2004/8/10 10:03

  • minahito

  • Just popping in

  • Posts: 6

  • Since: 2004/6/29


Hellow

The bug(?) about $xoops_isadmin was reported in http://www.xoopscube.jp. by Temumo and domifara.

If the user has the authority admin of one module,$xoops_isadmin be set true by all modules.

I cannot report well.(because I can't use English well)
please access this page. And catch up only a code.

domifara has proposed the code of correction.

2
Mithrandir
Re: $xoops_isadmin Logic bug?

$xoopsUser->isAdmin() without arguments is used to determine whether to show the Administration menu or not

If it is used in a module to determine whether the user is admin in THAT module, then it is used wrongly.

3
minahito
Re: $xoops_isadmin Logic bug?
  • 2004/8/10 12:24

  • minahito

  • Just popping in

  • Posts: 6

  • Since: 2004/6/29


Quote:

If it is used in a module to determine whether the user is admin in THAT module, then it is used wrongly.


Thank you for replying.
I received the same indication from Mr. onokazu,I understood.

But,default template uses the method($xoops_isadmin).
Is it right?

modules/system/templates/system_comment.html
line:25
<{if $xoops_isadmin == true}>


And newbb module : viewforum.php line 89
if ( $xoopsUser->isAdmin() || is_moderator($forum$xoopsUser->uid()) ) {


Are these a bad sample to 3rd party module developers?

4
Mithrandir
Re: $xoops_isadmin Logic bug?

Those are indeed two bad examples to show 3rd party module developers.

I'll keep that in mind.

5
minahito
Re: $xoops_isadmin Logic bug?
  • 2004/8/11 3:07

  • minahito

  • Just popping in

  • Posts: 6

  • Since: 2004/6/29


domifara added a report in http://www.xoopscube.jp

Quote:

userinfo.php line 79
misc.php line 198 and line 222
xoopsmembers/index.php line 132
xoopspartners/index.php line 47


new/viewforum.php line 89 which I pointed out might not be a problem. That is a code for administrator/moderator only forum.

The user who is the administrator of one module may have the right which accesses it.

Login

Who's Online

314 user(s) are online (103 user(s) are browsing Support Forums)


Members: 0


Guests: 314


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits