vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Pre-approval of permissions solution? I'm stuck. (https://vborg.vbsupport.ru/showthread.php?t=93012)

BLykMik 07-27-2005 05:50 PM

Pre-approval of permissions solution? I'm stuck.
 
I can't figure out a solution to this issue and was direct here from the vBulletin forums...

We're about to open up our forums to a specific client's user group (about 120+ people). The access will be to a "private" forum we currently have set up.

The only way I can give user's permission to the private forum (that I know of) is to adjust thier permission as soon as they sign up...

...but that would obviously cause a delay in their access... and could be discouraging to their participation in the forum. For many of these users, it will be their first time accessing a forum community.

I do have a list of all of the groups emails and was planning on telling them all to use that email to sign up. I planning on trying to stay on top of it and going through and give the access as fast as possible.... but obviously, most will have left (and not seen all there is to see in the private forum).

So, is there a solution to this issue? It is early, so I can try anything...

Is there any way to "pre-allow" permissions to users that register with a specified email address?

Or any other solution to giving immediate access? Unfortunately, it is a private client area, so I can't leave it open to the public.

working with: vBulletin Version 3.0.7

Andreas 07-27-2005 05:59 PM

Easy approach:
- Create a Datastore Record with a comma-separated List of all eMail-Adresses
- Load this in register.php
- Upon Account activation, explode this list into an array, in_array($useremail, $list)
- If true, assign an additional Usergroup that has access rights

BLykMik 07-27-2005 06:11 PM

Thanks... I was scared someone might say that. ;)

I really don't know any coding (I probably should have mentioned that in the original post)... I was just direct here from the main vbulletin site.

Actually, I think I understand exactly what you are telling me to do, I just wouldn't even know where to start to actually execute it. Thanks though.

Andreas 07-27-2005 06:51 PM

[sql]INSERT INTO datastore (title, data) VALUES ('emaillist', 'email1@domain1.com,email1@domain2.com,email3@doma in3.com')
[/sql]

In register.php
FIND
PHP Code:

    'banemail'
); 

REPLACE that with
PHP Code:

    'banemail',
    
'emaillist'
); 

FIND
PHP Code:

// ### DO THE UG/TITLE UPDATE ### 

If you want an additional Usergroup:
ABOVE that ADD
PHP Code:

$emails explode(','$datastore['emaillist']);
if (
in_array($userinfo['email'], $emails) AND $user['usergroupid'] == 2)
{
    
$dotitle .= ", membergroupids=IF(membergroupids='', 'X', CONCAT_WS(',', membergroupids, 'X'))";


If you want another Primary Usergroup instead:
ABOVE that ADD
PHP Code:

$emails explode(','$datastore['emaillist']);
if (
in_array($userinfo['email'], $emails) AND $user['usergroupid'] == 2)
{
    
$user['usergroupid'] = X;


X must obviously be replaced with the Usergroupid that has access rights ;)

Untested, but should work.

BLykMik 07-27-2005 08:03 PM

What the heck... I'll give it a try... Thanks!

Marco van Herwaarden 07-27-2005 08:03 PM

Hmm shouldn't that implode be an explode?

Andreas 07-27-2005 08:06 PM

/me should call $vbulletin->get_some_sleep() soon ...
Of course it should have been explode()

BLykMik 07-27-2005 08:24 PM

Quote:

Originally Posted by KirbyDE
[sql]INSERT INTO datastore (title, data) VALUES ('emaillist', 'email1@domain1.com,email1@domain2.com,email3@doma in3.com')
[/sql]

Quick question on the above... When I enter information into datastore, what does "(title, data)" reffer to? Is that something I should name specifically?

I've run a sql query once before, but it was on a different domain, and I believe the hosting company had a tool for it. I'm going through the instruction link now...

That is the only part that I'm really flying completely blind on.

Thanks.

Marco van Herwaarden 07-27-2005 08:27 PM

title, data are the column names in the table, and should not be changed.

BLykMik 07-27-2005 08:36 PM

Thanks... i got it... it is "emaillist" that is the specific name for the datastore.


All times are GMT. The time now is 07:04 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00995 seconds
  • Memory Usage 1,747KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete