11
suico
Re: register only if army.mil
  • 2007/8/24 15:37

  • suico

  • Friend of XOOPS

  • Posts: 374

  • Since: 2003/7/24


in userinfo.php put just before this:
le="color: #000000"><?php 34 $uid = intval($_GET['uid']); 35 if ($uid <= 0) { 36 redirect_header('index.php', 3, _US_SELECTNG); 37 exit(); 38 }

put this
le="color: #000000"><?php redirect_header('index.php',3,"you are not allowed to view or edit profiles");


Try this and tell me if it worked for you
Yogurt Social Network Service
Visit: http://www.marcellobrandao.eti.br/

12
Peekay
Re: register only if army.mil
  • 2007/8/24 15:38

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


As well as clicking a user name to view their profile, savvy XOOPS users can also enter:

http://www.example.com/userinfo.php?uid=2

and see the profile for the user whose id is '2'.

To prevent anon users seeing profiles:

Open 'userinfo.php' and find:

le="color: #000000"><?php $xoopsOption['pagetype'] = 'user'; include 'mainfile.php'; include_once XOOPS_ROOT_PATH.'/class/module.textsanitizer.php';

Then add this line below it:

le="color: #000000"><?php $xoopsUser or redirect_header('index.php', 3, _NOPERM);


Out of interest, did Vaughan's email hack work?
A thread is for life. Not just for Christmas.

13
adium
Re: register only if army.mil
  • 2007/8/25 17:30

  • adium

  • Just popping in

  • Posts: 99

  • Since: 2005/1/18


I was wanting something a little closer to XOOPS 2.2 with the profiles but this will work for now. At least I can open the site.

Yes, Vaughn's hack works. If I could get a hack like that for XOOPS 2.2 that would be awesome.

14
vaughan
Re: register only if army.mil
  • 2007/12/24 1:22

  • vaughan

  • Friend of XOOPS

  • Posts: 680

  • Since: 2005/11/26


being as nobody answered.

in XOOPS 2.2 you do exactly the same, except the file to edit is modules/profile/include/functions.php

find >

le="color: #000000"><?php if (!empty($be) && preg_match("/".$be."/i", $user->getVar('email'))) { $stop .= _PROFILE_MA_INVALIDMAIL.'<br />'.print_r($user->getVar('email')); break;


replace with

le="color: #000000"><?php if (!empty($be) && !preg_match("/".$be."/i", $user->getVar('email'))) { $stop .= _PROFILE_MA_INVALIDMAIL.'<br />'.print_r($user->getVar('email')); break;

Login

Donat-O-Meter

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