FreiChat related discussions
How do I get the username?

How do I get the username for profiles?

Its a very basic question that seems very difficult for me to figure out, how do I get the usernames pulled in custom.php for profiles.

This is the last piece of the configuration I have to fix.

The problem is $iden is improperly set in the config.

If I comment out $iden it works perfectly returning the userid. The problem is, my database has set up profiles based on username not userid. So I need $iden to work.

Basically I need the href to link to to link to $r_path.$iden not to " . $r_path . "showProfile.php?id=" . $id . " which is the default.

My databases are setup perfectly.

I have tried calling $res['usr_name']; but that seems to only return the current logged in user and makes every profile link, a link to the logged in users profile.

I am at a complete loss as to what to even look for.

How do I get the username for profiles? Its a very basic question that seems very difficult for me to figure out, how do I get the usernames pulled in custom.php for profiles. This is the last piece of the configuration I have to fix. The problem is $iden is improperly set in the config. If I comment out $iden it works perfectly returning the userid. The problem is, my database has set up profiles based on username not userid. So I need $iden to work. Basically I need the href to link to to link to $r_path.$iden not to " . $r_path . "showProfile.php?id=" . $id . " which is the default. My databases are setup perfectly. I have tried calling $res['usr_name']; but that seems to only return the current logged in user and makes every profile link, a link to the logged in users profile. I am at a complete loss as to what to even look for.

Hi,

In the method linkprofile_url(), you can get the username like this:

$username = $result['username'];
Hi, In the method linkprofile_url(), you can get the username like this: ``` $username = $result['username']; ```
153
1
2
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft