Author |
Topic |
|
Roger Fredriksson
Average Member
Sweden
556 Posts |
Posted - 28 June 2005 : 07:09:46
|
In order to give certain members access to only one topic I need the value of M_Country in Forum_Members table. Where do I catch that value? It is used in the beginning of topic.asp and post.asp to check if the member is allowed to write and read the topic. |
rf/www.avgifter.com |
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 28 June 2005 : 07:22:31
|
Very discriminatory of you!
Anyway, have a search of these forums for "required fields", "required information" and similar, these types of requests come up on a very regular basis.
|
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
|
|
Roger Fredriksson
Average Member
Sweden
556 Posts |
Posted - 28 June 2005 : 07:59:02
|
I did a search but could not find (or understand) a solution meeting my needs. The "discriminated" members are companies and will get the value in M_COUNTRY by me putting it there; BOL_234 is one example. BOL stands for a category of customers and 234 tells the app that the customer is allowed to read and write only topic 234.
I can of course make a connection and extract the value in my test which is placed in the beginning of topic and post-files, but I guess that there is a smarter way of getting my hands on the value of M_COUNTRY.
While writing this I wonder why I do not use only username, xxx_BOL_234, for the test.
Sorry for posting a stupid q and thank you for guiding.
(PS My alternative to a discriminatory behavior is to lock them out completly from topics where customers evaluates the companies. I do have a service that they can buy and therefore locking them out would be blacmailing, would it not ? :)) |
rf/www.avgifter.com |
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 28 June 2005 : 08:06:59
|
lol! I was only funning you, man!
But, yes, if their username also contains their category then the easiest way would be to use intsr on strDBNTUserName to check for the presence of the relevant category name.
If you still want to make the country mandatory, see here. If you go this route, I'd suggest reading M_COUNTRY into a variable using the chkUser function - this way, you'll always have that variable available to you without the need for additional SQL queries when you want to check it.
|
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
|
|
Roger Fredriksson
Average Member
Sweden
556 Posts |
Posted - 28 June 2005 : 08:34:44
|
Thanks to the smiley I did understand, calling locking out blackmailing was an attemt to give you a receipt. The thing I asked for was chkUser funcion, could be of help in the future but now I will use strDBNTUserName. Thx again. |
rf/www.avgifter.com |
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 28 June 2005 : 08:53:44
|
You're welcome, Roger Sorry if my brain seems a bit fried, been a long week, and it hasn't even started yet!
|
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
|
|
Roger Fredriksson
Average Member
Sweden
556 Posts |
Posted - 28 June 2005 : 15:24:03
|
Why did I have to comment your lol? You and your expert-colleauges are worth every lol you can get. |
rf/www.avgifter.com |
|
|
|
Topic |
|