Login
Username

Password



Not a member yet?
Click here to register.

Forgotten your password?
Request a new one here.
Navigation
Latest Addons
AD Gallery 45
SyntaxHighlighte... 48
Newsletters v4.03 107
Facebook Like Box 123
Newsletters v4.02 56
Metro 157
Facebook Connect 166
Shoutbox Panel 125
Redactor for PHP... 104
MI Floating Side... 107
Facebook Login/R... 151
Avatar Studio v2.03 177
Relationship Sta... 96
Sexual Orientati... 113
Fisherman 141
Popular Addons
iTheme2 5797
Arise 5785
User Control v1.23 4617
Event Calendar 4046
Photowidget panel 3884
Radio-Theme red2... 3351
Highslide Gallery 3311
CSS/JavaScript D... 3223
Facebook Connect... 2980
Dynamic Menu 2889
Slideshow Lightb... 2719
L-AMANT 2656
Enigma 2630
2Dark 2603
Black 2571
View Thread
Official Home of PHP-Fusion » General Addon and Modification Support » Ideas for Modifications and Requests
Who is here? 1 guest(s)
 Print Thread
get username of an unactivated member
jannik
Hi

In my register I need to get the user_name when the user has created acount...

on the page that normally says that an admin will activate the account I have inserted a paypal script that needs to collect the name.

it worked fine on my old site 7.01.03 but now in v 7.02.04 it doesnt work.

My old code:

$result = dbquery("SELECT user_id FROM ".DB_USERS." WHERE user_name='$username'"Wink;
if (dbrows($result)) {
$data = dbarray($result);
$custom_id = $data['user_id'];
}

echo "".custom_id."";

Can someone help me so I can echo custom_id in v 7.02.04 ?

Thanks in advanceSmile

Jannik
 
www.mubase.dk
DrunkeN
I am not sure on what you mean now but try this.
Download source  Code
$result = dbquery("SELECT user_id FROM ".DB_USERS." WHERE user_name='$username'";
if (dbrows($result)) {
$data = dbarray($result);
$custom_id = $data['user_id'];
}

echo $custom_id;



Dark Fusion - PHP Fusion v7 Mods , Tutorials , Support
 
http://dark-fusion.se
miskith
You can use:
Download source  Code
$result = dbquery("SELECT user_id FROM ".DB_USERS." WHERE user_name='".$username."'");
if (dbrows($result))
{
    $data = dbarray($result);
    echo $data['user_id'];
}



Or
Download source  Code
$result = dbquery("SELECT user_id FROM ".DB_USERS." WHERE user_name='".$username."'");
while ($data = dbarray($result))
    echo $data['user_id'];





EDITED: If you aren't using stripinput() (or mysql_real_escape_string()) before these lines:
Download source  Code
$result = dbquery("SELECT user_id FROM ".DB_USERS." WHERE user_name='".stripinput($username)."'");
if (dbrows($result))
{
    $data = dbarray($result);
    echo $data['user_id'];
}



or
Download source  Code
$result = dbquery("SELECT user_id FROM ".DB_USERS." WHERE user_name='".stripinput($username)."'");
while ($data = dbarray($result))
    echo $data['user_id'];



My projects:
PHP-Fusion Czech | miskith portfolio | theConnex (In preparation) | Online game (Future project)
 
http://www.theconnex.com
Jump to Forum:
Similar Threads
Thread Forum Replies Last Post
Member Stats Code Snippet and functions 16 13-04-2013 17:43
Batch deleting spam unactivated members? User Administration 12 07-03-2013 09:23
Unactivated members & Email Notification User Administration 8 01-03-2013 10:20
restrict member view photogallery album Content Administration 4 23-01-2013 15:29
New member problem User Administration 1 18-01-2013 05:01
Official Home of PHP-Fusion uses cookies. Some may already have been set. Read more about our Cookies here.
Please click the button I Consent Cookies to hide this bar and accept our cookies. If you continue to use the site with no action taken, we'll assume that you consent our cookies anyway.
Cookiebar Panel byVenue