Author |
Topic  |
|
ASP.Confused
Starting Member
16 Posts |
Posted - 23 June 2004 : 08:44:16
|
I have a table with all my users for my site. I just recently installed Snitz forums, and would like to be able to use my already existing user table with Snitz. Would I be able to create a query named FORUM_MEMBERS, and only pass the information I need to it, or would I have to modify the code to do what I want it to do? |
|
proeder
Junior Member
 
Australia
230 Posts |
Posted - 23 June 2004 : 09:35:22
|
As long as the fields in your table are the same with the same values than the Snitz on - no problem. Probably that's not the case... is it?
So a better idea would be to transform your users into the forum_members table and use that one on your existing pages. If you use the snitz table you have to rewrite your existing queries, if you use your existing table you would have to rewrite all the statements in snitz - which would be a hell lot of work! |
Looking for german Snitz forum? Suchst Du ein deutsches Snitz Forum? Hier findest Du eins...
Hosting with ASP Support available: http://www.sharepointing.com |
 |
|
ASP.Confused
Starting Member
16 Posts |
Posted - 23 June 2004 : 10:29:16
|
I had attempted to create a query named FORUM_MEMBERS (I renamed the original FORUM_MEMBERS table.) It would not even recognize that there were users, which leads me to believe that Snitz binds itself to a table, and cannot use a query...correct me if I'm wrong.
I can just migrate the users from my other table to FORUM_MEMBERS, but I would rather have it instant (where when I add/remove a user from my table, it does the same for FORUM_MEMBERS.)
I'm using MS SQL 2000. |
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
Posted - 23 June 2004 : 11:50:21
|
You can create a view named FORUM_MEMBERS, but it will only work for table reads. Views cannot be updated, but you could always create INSTEAD OF triggers to overcome that. |
Snitz 3.4 Readme | Like the support? Support Snitz too |
 |
|
ASP.Confused
Starting Member
16 Posts |
Posted - 24 June 2004 : 15:27:35
|
I'm just going to maintain two separate tables, and just copy the info from one to the other (not the best solution, but it definitely works.) |
 |
|
proeder
Junior Member
 
Australia
230 Posts |
Posted - 25 June 2004 : 00:01:18
|
I didn't want to suggest that because I thought that would be way to simple and unprofessional and rui would cut me off some fingers for that... |
Looking for german Snitz forum? Suchst Du ein deutsches Snitz Forum? Hier findest Du eins...
Hosting with ASP Support available: http://www.sharepointing.com |
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
Posted - 25 June 2004 : 04:33:06
|
quote: Originally posted by proeder
(...) and rui would cut me off some fingers for that...
Nah, I don't think so, I'm a peaceful guy ... 
Anyway, it may be a bit more complex solution to develop, but I'm all for the view + instead of triggers solution. It's a clean solution, no need at all to change the forum code, and it works perfectly. |
Snitz 3.4 Readme | Like the support? Support Snitz too |
 |
|
ASP.Confused
Starting Member
16 Posts |
Posted - 25 June 2004 : 15:40:46
|
I might give the view + "instead of" triggers a try.
I also had another idea...is there a way to implement the SHA256 algorithm used in inc_SHA256.asp into an SQL stored procedure, so that I can translate the passwords currently in my table on the fly? :-) I've never did any stored procedures before, and would like a general idea of what to do.
The passwords currently in my site's user table have a reversable decryption scheme (luckly...lol.) |
 |
|
rory
Starting Member
12 Posts |
Posted - 25 July 2004 : 13:25:13
|
I've searched throughout the forums, and using an existing member database seems like a common enough need, but there doesn't seem to be an easy fix. Complex SQL triggers and table views just seem way to complicated, and error-prone.
Last night I came up with a possible workaround, and wondered if anyone can help me find 1) what's wrong with this approach, since it seems so simple, and 2) a more efficient and elegant way of achieving this. Seems like this would be useful to quite a few people.
A) Creating new members. I have an existing member approval/creation system using PayPal IPN that works. I don't want my members to have register again for the forums. I included inc_sha256.asp. In my member creation script I added the following query:
strSql = "INSERT INTO " & strMemberTablePrefix & "MEMBERS (M_NAME, M_PASSWORD, M_EMAIL) VALUES ('" & memberid & "', '" & strEncodedPassword & "', '" & memberemail & "')"
Works like a charm - I now have a fully functional member pre-setup in my forums.
B) Auto-login: I looked at the universal_login mod, but that's not what I need. I don't want users to have to log into forums at all, since they already authenticated to my portal. My kludgey workaround is to have an invisible form on my main member homepage, that's automatically submitted by body onLoad. This simply sends their userid/password to forum/default.asp and logs them in. This works via either GET or POST. They are then redirected back to my member homepage and can continue to browse the site. When the time comes to access the forum, they're already logged in.
Here are the immediate problems I see: A: This user creation process bypasses the normal checks for existing userid/email. I was able to create 2 identical users. Not a major problem, because I'm already checking those things at my existing member creation steps.
B: Obviously a problem as the userid/password is sent in cleartext. Does anyone know of a way of doing this via an ASP/SQL query, so I can do it invisibly without the need to send the form?
Thanks, Rory
btw: I'm using Speedball cause I love CSS. And Access db.
|
 |
|
|
Topic  |
|