Customizing SMF > SMF Coding Discussion

check if a user is ignored

<< < (2/4) > >>

Arantor:
No, it's the string literal in the database, it is in the comma-separated list of member ids that the current user is ignoring.


If you're looking for B being ignored by A, you can only use $user_settings if B is the current user. Generally that means you're going to be looking up all the people ignored by A, which means getting the list of the ignored list for A and then comparing the id member for each commentator against the list.

ibtkm:
Yes you are right and I neeed the list but I got a problem. the user_settings var is NULL. maybe because I'm in Profile.template file and it is not defined there. hmm? what do you suggest to do?

Arantor:
Maybe it's because it's not pulled in from scope, or maybe it's because it's the wrong variable for what you want anyway since you seem to be interested in the current user, I thought you wanted to be interested in the person whose profile it is (and then compare the list to that) which is not necessarily the current user...

ibtkm:
No, I don't know if I explained good or not. I mean I'm the current user and I wanna know if i'm ignored by who i'm visiting his profile.

Arantor:
Then you have to query the current user's profile to get *their* ignored list and compare the current user id to it.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version