1
MS-2001
xoopsUser in Adminarea
  • 2004/10/23 18:43

  • MS-2001

  • Quite a regular

  • Posts: 204

  • Since: 2004/7/27


how do i get the emailadress of a user with $uid as uid in modules/mymodul/admin/index.php where '../../../include/cp_header.php' is included?

2
MS-2001
Re: xoopsUser in Adminarea
  • 2004/10/25 17:29

  • MS-2001

  • Quite a regular

  • Posts: 204

  • Since: 2004/7/27


nobody who could help me?

3
Mithrandir
Re: xoopsUser in Adminarea

$member_handler =& xoops_gethandler('member');
$thisuser =& $member_handler->getUser($uid);
$thisuser_email $thisuser->getVar('email');

4
MS-2001
Re: xoopsUser in Adminarea
  • 2004/10/26 18:46

  • MS-2001

  • Quite a regular

  • Posts: 204

  • Since: 2004/7/27


seems to work quite well ;)
just 2 more questions for the moment:

1.) $xoopsConfig['sitename'] is the next thing i need. how do i get it (same file).

2.) i want to show all winners of an expired competition. therefor i've got some code :-/

$member_handler =& xoops_gethandler('member');
        
$winners explode("|"$myrow['winners']);
        
$gw['gws'][$k]['showwinners'] = false;
        
        if (
sizeof($winners) > 0) {
            
$gw['gws'][$k]['showwinners'] = true;
            for(
$i=0$i sizeof($winners); $i++) {
                
$thisuser =& $member_handler->getUser($winners[$i]);
                
$gw['gws'][$k]['winners'] .= $thisuser->getVar['uname'].", ";
            }
        }
        
$gw['gws'][$k]['winners'] = substr($gw['gws'][$k]['winners'],0,strlen($gw['gws'][$k]['winners']-2));


for my tests i'm using 4 records. the values for $myrow['winners'] are:

a.) ""
b.) ""
c.) "1"
d.) ""

but it seems not to work? sizeof($winners) is 1 for each of my records. could someone help me ?

5
ejuden01
Re: xoopsUser in Adminarea
  • 2004/10/26 18:49

  • ejuden01

  • Not too shy to talk

  • Posts: 121

  • Since: 2004/4/5 1


1. You must globalize $xoopsConfig in your file to be able to call it. Let me know if this is what you needed.

global $xoopsConfig;
$sitename $xoopsConfig['sitename'];

6
MS-2001
Re: xoopsUser in Adminarea
  • 2004/10/26 19:09

  • MS-2001

  • Quite a regular

  • Posts: 204

  • Since: 2004/7/27


Quote:

ejuden01 wrote:
1. You must globalize $xoopsConfig in your file to be able to call it. Let me know if this is what you needed.

global $xoopsConfig;
$sitename $xoopsConfig['sitename'];


thx, that works fine ;)

7
MS-2001
Re: xoopsUser in Adminarea
  • 2004/10/27 10:08

  • MS-2001

  • Quite a regular

  • Posts: 204

  • Since: 2004/7/27


i found a solution for my other problem. thx anyway ;)

Login

Who's Online

241 user(s) are online (56 user(s) are browsing Support Forums)


Members: 0


Guests: 241


more...

Donat-O-Meter

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

Latest GitHub Commits