Membership website_accounts

7 posts by 2 authors in: Forums > CMS Builder: Plugins & Add-ons
Last Post: July 29, 2013   (RSS)

By gregThomas - July 25, 2013

Hi,

I would leave it as its default value of accounts. The $GLOBALS['WSM_ACCOUNTS_TABLE'] is the table that you want users to be stored in. By default it is set to use CMS Builders accounts table, users who are created using the provided sign up form (user-signup.php) in the code generator won't have access to the CMS admin area.

But you can also duplicate the accounts section and store users in that instead. If you did this you would need change the variable $GLOBALS['WSM_ACCOUNTS_TABLE'] from its default of accounts to the name of the new section you had created.

Thanks!

greg

Greg Thomas







PHP Programmer - interactivetools.com

By thenetgirl - July 25, 2013

I did set it to website_accounts  but when trying to use addform It just doesnt go to the database  - I am attaching my newsform. Really quite simple.

I have everything else working on the membership thing - sign-up log-in user-profile mail alerts -  it just wont add a record to the database.

$GLOBALS['WSM_ACCOUNTS_TABLE']   Do I need to change something in the CMS backend to get them to be able to post a record?

Patricia

www.thenetgirl.com
Attachments:

newsform.php 4K

By gregThomas - July 26, 2013

Hi,

I've had a look at the newsform.php file, but I can't see were you're using the $GLOBALS['WSM_ACCOUNTS_TABLE'] variable, it looks as if you're adding data to the news section. If the sign-up/login/user profile pages are working correctly then you shouldn't need to change the $GLOBALS['WSM_ACCOUNTS_TABLE'] variable. Are you getting any errors when a user tries to add a record? 

Cheers

Greg

Greg Thomas







PHP Programmer - interactivetools.com

By thenetgirl - July 26, 2013 - edited: July 26, 2013

http://montereyscambusters.com/user-signup.php

No errors it just doesnt do anything -  I changed the website thing in the membership plugin I attached it  - $GLOBALS['WSM_ACCOUNTS_TABLE'] = 'website_accounts'; // set the accounts table WSM uses, change this to store website accounts in a different table

following the instructions in that -  my question is regarding the  - Users who are created through the website won't have access to any CMS
section unless you allow it by adding code to the signup form.  what is the CODE so they can post to the news ????

ADDITIONAL TECHNICAL NOTES
-------------------------------------------------------------------------------
- User login sessions are not shared between the CMS and the website. So you need
to login to each separately. If you'd like to have a unified login set this value
in the plugin: $GLOBALS['WSM_SEPARATE_LOGIN'] = false;

- User accounts for the CMS and the website are stored in the same database table
which is called "accounts". If you want to use a separate table for website
accounts, set $GLOBALS['WSM_ACCOUNTS_TABLE'] = "website_accounts";

- Users who are created through the website won't have access to any CMS
section unless you allow it by adding code to the signup form.

- Users who are "disabled" in the CMS will not be able to login to the website.

- Users with a 'lastLoginDate' date field will have that value updated every
minute when logged into the website and accessing pages that include
viewer_functions.php

Patricia

www.thenetgirl.com
Attachments:

websitemembership_001.php 16K

By thenetgirl - July 29, 2013

I gave up on this ever working

Patricia

www.thenetgirl.com

By gregThomas - July 29, 2013

Hi,

The line "- Users who are created through the website won't have access to any CMSsection unless you allow it by adding code to the signup form." only refers to users who you want to be able to access the CMS admin area directly, not to saving data to sections via MySQL insert statements as is used in the newsform.php.

If you want to use the newsform.php to save posts to the news section you don't need to give users access to the CMS directly, the MySQL insert statement code you're currently using should work. 

When you submit the form, are you getting the "Thanks, we've added your news message"?

Cheers

Greg

Greg Thomas







PHP Programmer - interactivetools.com