Read userid from field

jesperlowe

New Member
5 Years ago i made a site for a car club i was involved in.
On the site was a "my car" list where i made a simple list with users/cars and pictures of the car.
Recently the sita was hacked and destroyed, i managed to recover the mycar database from mysql, and now have the list and cars working, with images.

I have one field that wont "work"

Initially i had 2 fields pointing to the userid and userid/name, the userid field shows the userid from joomla but the username field is empty.

Can i get the username field to update from the userid without having to manually edit all records.
 
So was the 'username' field a text field with the actual username, or a user element (with the numeric user id) which held the ID but showed the name?

Are the values form that field entirely missing, or is it just not displaying what you would expect?

-- hugh
 
The Username field was the users name (John Doe) in text which i picked up when it was created and the Userid was their number (47) that was used to allow who could edit the "row"

The value in Userid is there (47) but the username (John Doe) displays and empty field.
 
Assuming the userid is their Joomla user ID, you can set the name in your table by running this query manually in phpMyAdmin (or whatever you use):

UPDATE yourtable LEFT JOIN xxx_users ON xxx_users.id = yourtable.userid SET yourtable.username = xxx_users.username

Obviously change the table names and the field names on yourtable to suit.

And obviously, back up your database before trying anything, in case you get it horribly wrong.

-- hugh
 
BTW ... have you upgraded J! and Fabrik to latest versions? If your site is still running versions from 5 years ago, most likely you'll get hacked again.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top