hello,
i use feu and custom content but i dont know how use firstname and lastname with uusername -->{username}
i give my program:
----------------------------------------------
global $gCms;
$feusers =& $gCms->modules['FrontEndUsers']['object'];
$userid = $feusers->LoggedInName();
$pass = $feusers->GetUserProperty($userid);
echo "a$userid
";
echo "b$feusers
";
echo "c$pass
";
$prenom = $name;
$user="root";
$host="Localhost";
$password="";
$database="cms";
$connexion = mysql_connect($host, $user, $password) or die ("Connect impossible");
$db = mysql_select_db($database, $connexion) or die ("database impossible");
$rq = "SELECT first_name FROM cms_users WHERE username= '$userid'";
$result = mysql_query($rq) or die ("Request impossible");
echo "hello $result";
-------------------------------------------------------
For echo "a$userid
"; --> it is good but,
For echo "hello $result"; --> it is bad (Hello resource id #258)
do you help me to find a answer? thanks.
problem with firstname and lastname !!!
-
calguy1000
- Support Guru

- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
Re: problem with firstname and lastname !!!
The way to interact with the FrontEndUsers module is via the api, as described in FrontEndUsers.api.php
Try this:
Try this:
Code: Select all
global $gCms;
$feusers = $gCms->modules['FrontEndUsers']['object'];
if( $feusers )
{
$uid = $feusers->LoggedInId();
$properties = $feusers->GetUserProperties($uid);
print_r( $properties );
}Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
