Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - using our own membership db on SQL Server
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

using our own membership db on SQL Server

 Post Reply Post Reply Page  12>
Author
ralphuk100 View Drop Down
Newbie
Newbie


Joined: 08 April 2003
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote ralphuk100 Quote  Post ReplyReply Direct Link To This Post Topic: using our own membership db on SQL Server
    Posted: 08 April 2003 at 7:25am
Is it possible to set up the forums so that members do not need to create a profile for our site AND the forums? We were hoping to put the forums code inside a protected page, and if the user is logged in then they can see the forums and post, and it would get their username from a session variable? Anyone done this?
Back to Top
glypher View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 25 March 2003
Location: United States
Status: Offline
Points: 38
Post Options Post Options   Thanks (0) Thanks(0)   Quote glypher Quote  Post ReplyReply Direct Link To This Post Posted: 08 April 2003 at 11:35am

If i'm understanding you coorectly you're looking to use the session variables from the previous profile to work with the forum code.  yes, you /could/ do this, the only problem would be that when the user registered for your site, you would need to be sure that hte/she registered with the same username/password on both, OR create some type of "link" between the two tables to keep all that straight.

i ran into a similar quandery a while back.  I ended up deciding to import my current userlist into the authors table of the WWF (along with other settings i had for them (made new fields). Thus creating a single users table.  Then i modified the WWF reg page (and "other" admin pages that i used with the old profiles) to update the authors table with the new fields.

i know it's not exactly what you want, but this will give you the functionality you wanted, and save some headaches in the longrun.

glypher said so.

GainesvilleBands.com
Back to Top
ralphuk100 View Drop Down
Newbie
Newbie


Joined: 08 April 2003
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote ralphuk100 Quote  Post ReplyReply Direct Link To This Post Posted: 08 April 2003 at 12:48pm

well... what we want to do is use our members table for access to our site AND the forums... basically, can we remove member signup from the forums, make them open access, and then have it so that a new post is marked as being from session("securedusername")?

Or would we have to change our member sign up so that when a new member was created it also writes the necessary fields to the WWF authors table? Basically, I am trying to get past having to have two member tables.

I have done a rather bad structure below:

MEMBER REGISTERS WITH SITE AND CLICKS CREATE ACCOUNT
         |
         |
write member table ----------- write relevant fields to WWF table
         |                                              |
         |                                              |
member can log on to site and forums ----

It would be much better if the forums authors table could be ditched and have it call the account details from our members table if you follow me?

I hope that makes some kind of sense

Back to Top
Auritania View Drop Down
Newbie
Newbie


Joined: 09 April 2003
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote Auritania Quote  Post ReplyReply Direct Link To This Post Posted: 09 April 2003 at 9:24am
I got it working close to the way I think you are describing with V6.34 and access. My basic process was to remap the login/logout/registration pages to my existing site pages. The forum uses a usercode field that contains a random string appended to the basic username. I added code to my registration page to generate a valid usercode and then write that code along with username and password to the forum tblAuthors at the same time it writes that data to my table. This left the forum databases intact and allows for users to enter email/www/signature etc in their forum profile later since that table is still there. Yes, it's double storage of information, but it's simple and works. Then on the login/logout/registration pages I have to set 2 cookies for the forum and my 1 cookie for my site to the appropriate values. The last step I had to perform was assign every existing user a valid forum usercode and then copy the name/pass/usercode to the tblAuthor table in the forum. That enabled everyone who already existed. I think it took about 30 minutes to figure it out and code it, so it isn't that hard.
Back to Top
ralphuk100 View Drop Down
Newbie
Newbie


Joined: 08 April 2003
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote ralphuk100 Quote  Post ReplyReply Direct Link To This Post Posted: 09 April 2003 at 9:35am
thanks Auritania, I think that is what I am going to have to do. I can cope with double storage, the only problem I will have is that I will manually have to delete users from tblAuthors when they close their account on the site. It cant be helped though.
Back to Top
Auritania View Drop Down
Newbie
Newbie


Joined: 09 April 2003
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote Auritania Quote  Post ReplyReply Direct Link To This Post Posted: 09 April 2003 at 9:48am
Originally posted by ralphuk100 ralphuk100 wrote:

I will manually have to delete users from tblAuthors when they close their account on the site. It cant be helped though.


I don't think you will want to delete them from tblAuthors.

If you use your table and login pages, disabling or deleting them from your database will stop them from using the forum (won't authenticate). If you delete them from tblAuthors, any posts they may have made will no longer contain valid information. I'm not familiar with the code, but it may even throw errors rather than just bogus information.
Back to Top
ljamal View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 16 April 2003
Status: Offline
Points: 888
Post Options Post Options   Thanks (0) Thanks(0)   Quote ljamal Quote  Post ReplyReply Direct Link To This Post Posted: 17 April 2003 at 11:21pm
What I did to use my membership table was change the tblAuthor table to tblAuthorA and deleted the duplicated columns and changed Author_ID form being an Identity column (autonumber). I then populated tblAuthor with the Author_ID from my members and created a view called tblAuthorA which joined by membership table with tblAuthorA.

NOTE: I also removed the UserCode field and replaced it with a field generated within the view from the login, email and last name of the user just because it made my life easier.

I updated the login cookie ("forum") to use the member cookie that my site already creates and updated my site's cookie to include the UserID and Hide cookie values. I did this to minimize the number of cookies. The only page that needed to be updated for the cookies is common.asp. Note you will not be able to use the forums membership tools or registration, because you can not update a view, but since I have a separate areas for those functions on my site this was not an issue. I have completed the integration yet but so far I haven't run into any major issues.

Note if you are running a version 6.X you will need to have a member with the authorID of 1 and 2 for the admin and the guest accounts. I had to add these to my membership table.
Back to Top
ralphuk100 View Drop Down
Newbie
Newbie


Joined: 08 April 2003
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote ralphuk100 Quote  Post ReplyReply Direct Link To This Post Posted: 18 April 2003 at 3:50am

Ok, I have finally installed a solution that works for us. I have documented it below in case anyone else wants to use it.

ljamal - I know @ users 1 + 2 - although it took me a while to figure out as I had not analysed the table properly. I have turned off identity in tblAuthor author_id so that it accepts whatever ID is passed to it now.

I have kept the original tblAuthor intact. When a user registers on our site proper there is a Stored Procedure in the SQL Server db that writes to our membership table, if thats successfully it uses

SELECT SCOPE_IDENTITY()

RETURN (0)

to return the id just created in the members table (@@identity also works but is very very occasionally wrong) - this ID then goes into proc_NewForumMember which puts the right details into tblAuthor - setting the account to active, account status 1.

I have disabled the registration function on the forums so that users cannot register a separate account by removing all pages regarding registration from the live server and also commenting out any links to the registration process. I have also disabled the password changing in the forums edit profile so that the passwords have to match. If the user wants to change their password then the Stored Procedure that does this for the main site also updates the record in tblAuthor. Similarly, if an account on our site expires or is deactivated then it writes to tblAuthor as well.

Back to Top
 Post Reply Post Reply Page  12>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.