PDA

View Full Version : Looking up user by id verses username?


Micolai
05-15-2021, 12:38 AM
Does anyone know how I would get the system to search for a user by their ID rather than username?

I'm assuming where it says on the donation file for example, $mysidia->user->username probably needs changed to something like user->uid So would I just change that to uid? I'm wanting my search area and what not and messages to look up people by their id's instead of usernames.

Hall of Famer
05-17-2021, 09:55 PM
Actually the system is able to construct a Member object based on either user ID or username, so that part of functionality is working. All you need to do is to change the database query code, aka the whereclause, to match a user ID rather than a username.

Micolai
05-17-2021, 10:56 PM
I'm sorry, I'm still learning coding lol that database query code, is that something that gets changed in the database or in the file I'm working in?