Customizing SMF > SMF Coding Discussion
How can I Get the Users Name By entering the users ID?
(1/1)
ExOTIXx:
Hey guys!
I'm new to Coding php..
But I'm kinda getting the hang of it,
I coded a little script that Shows the Users ID number at the top of my webpage and
On the users profile..
I want to be able to get the Username of a Members ID? Is that possible?
I'm using SMF 2.0.2 and I used "[member][id]"
I wish to do this for my programs, I'm making a login feature that integrates
With my site through this program, and I want the users to be able to log into
The program with entering their ID and password.
I have already coded a login feature that uses Usernames and passwords, but
It doesn't support special characters.
Arantor:
The username of a given member's id or specifically the currently logged in member?
To be honest, though, you could do much worse than just including SMF's SSI.php module, which will check the cookie used by the forum and if it is a logged in member, they will be able to be logged in for your custom page too, which means one login system for the entire site, one set of data, works with special characters and has been proven to be stable.
ExOTIXx:
--- Quote from: Arantor on July 30, 2012, 07:05:06 PM ---The username of a given member's id or specifically the currently logged in member?
To be honest, though, you could do much worse than just including SMF's SSI.php module, which will check the cookie used by the forum and if it is a logged in member, they will be able to be logged in for your custom page too, which means one login system for the entire site, one set of data, works with special characters and has been proven to be stable.
--- End quote ---
I just want to be able to retrive a members username if I enter a ID .. Like.. Say if I entered "1" into the username field, I would get a echo with the username corresponding to that id number..
Arantor:
Which requires a database query, and have loaded a decent chunk of SMF to really do that anyway.
Except that I think you're risking the security of your site doing what I think you're trying to do...
Navigation
[0] Message Index
Go to full version