1
Cuidiu
Add Group Hack Request
  • 2006/5/31 18:17

  • Cuidiu

  • Quite a regular

  • Posts: 358

  • Since: 2006/4/23


I would like to hack the following part of the userinfo.php code to include a specific group in addition to the Admin:
if ($thisUser->getVar('user_viewemail') == 1) {
    
$email $thisUser->getVar('email''E');
} else {
       
$email "";
    if (
is_object($xoopsUser)) {
        
// All admins will be allowed to see emails, even those that are not allowed to edit users (I think it's ok like this)
        
if ($xoopsUserIsAdmin || ($xoopsUser->getVar("uid") == $thisUser->getVar("uid"))) {
            
$email $thisUser->getVar('email''E');
        }
    }
}

I don't want to create another admin group just for this.

Would someone help me add a group to this? Would I be using groupid?
[size=x-small]Working sites:
XOOPS 2.0.16 PHP 5.2.2, MySQL 5.0.24a-standard-log, Apache/2.0.54 (Unix)
XOOPS 2.2.4, PHP 4.3.10, MySQL 3.23.58, Apache/1.3.33 (Unix)[/size]

2
Cuidiu
Re: Add Group Hack Request
  • 2006/6/1 16:17

  • Cuidiu

  • Quite a regular

  • Posts: 358

  • Since: 2006/4/23


Am I am asking the impossible here?
[size=x-small]Working sites:
XOOPS 2.0.16 PHP 5.2.2, MySQL 5.0.24a-standard-log, Apache/2.0.54 (Unix)
XOOPS 2.2.4, PHP 4.3.10, MySQL 3.23.58, Apache/1.3.33 (Unix)[/size]

3
Chris03
Re: Add Group Hack Request
  • 2006/6/1 16:40

  • Chris03

  • Quite a regular

  • Posts: 372

  • Since: 2004/2/22


Are you wanting other groups to be able to see users emails?
KickassAMD

4
Cuidiu
Re: Add Group Hack Request
  • 2006/6/1 18:35

  • Cuidiu

  • Quite a regular

  • Posts: 358

  • Since: 2006/4/23


Quote:
Chris03 wrote:
Are you wanting other groups to be able to see users emails?

Yes. One specific group, but if it has to be all registered users instead, I can live with that. It's the public/anonymous I'm trying to hide emails from. Anonymous users are allowed to view some of the information in a member's profile but there's no way to set permissions to hide emails from the public. The only way is if no is selected for "allow others to view my email" but if no is selected, it's no across the board. The registered users are allowed to email each other and view each other's emails. It's something that's needed in this organization but if we can exclude the public then that would be good. I've already worked out a way for the public to contact a member thanks to sceilig. So displaying email addresses should only be for registered users. Is there a way to hack this?
[size=x-small]Working sites:
XOOPS 2.0.16 PHP 5.2.2, MySQL 5.0.24a-standard-log, Apache/2.0.54 (Unix)
XOOPS 2.2.4, PHP 4.3.10, MySQL 3.23.58, Apache/1.3.33 (Unix)[/size]

5
Cuidiu
Re: Add Group Hack Request
  • 2006/6/2 21:57

  • Cuidiu

  • Quite a regular

  • Posts: 358

  • Since: 2006/4/23


So I'm guessing it isn't possible then?
[size=x-small]Working sites:
XOOPS 2.0.16 PHP 5.2.2, MySQL 5.0.24a-standard-log, Apache/2.0.54 (Unix)
XOOPS 2.2.4, PHP 4.3.10, MySQL 3.23.58, Apache/1.3.33 (Unix)[/size]

6
Cuidiu
[SOLVED] Re: Add Group Hack Request
  • 2006/6/3 15:48

  • Cuidiu

  • Quite a regular

  • Posts: 358

  • Since: 2006/4/23


Well, what do you know... I figured it out! All it took was a few lines commented out.
[size=x-small]Working sites:
XOOPS 2.0.16 PHP 5.2.2, MySQL 5.0.24a-standard-log, Apache/2.0.54 (Unix)
XOOPS 2.2.4, PHP 4.3.10, MySQL 3.23.58, Apache/1.3.33 (Unix)[/size]

Login

Who's Online

162 user(s) are online (115 user(s) are browsing Support Forums)


Members: 0


Guests: 162


more...

Donat-O-Meter

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

Latest GitHub Commits