vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Un-Activated User Management (https://vborg.vbsupport.ru/showthread.php?t=65845)

sabret00the 06-08-2004 05:56 AM

Quote:

Originally Posted by psico
What happend if a user change his email and make a mistake? This user would lost his account in ten days??

sadly yes, however feel free to add the functionality you require.

PranK 06-08-2004 06:05 AM

Quote:

Originally Posted by sabret00the
i saw a post by someone the other day that said they had 200 members unconfirmed, to think something like this could've seduced em into completing their registration.

I got close to 1000... :(

Thanks heaps for this, its great!

Christian

Yahhoon23 06-08-2004 06:29 AM

Quote:

Originally Posted by psico
What happend if a user change his email and make a mistake? This user would lost his account in ten days??
I think this hack have to check if this user is a new registration or an email change, for obvious reasons ;)

Great hack dude!

Anyone have any info on how to accomplish this. You are right that it should check, but my skills in vb aren't good enough to do this without help :(

sabret00the 06-08-2004 06:36 AM

at a quick glance you'd need to edit this
PHP Code:

    $userArray=$DB_site->query("
        SELECT username,user.userid,email,joindate,activationid 
        FROM user
        LEFT JOIN useractivation ON (user.userid=useractivation.userid)
        WHERE user.usergroupid=3
    "
); 

make it select the posts column as well and then include the clause to say

PHP Code:

        WHERE user.usergroupid=3
AND posts 

i'll take a proper loook when i wake up, as right now i need a little sleep

Bryan Ex 06-08-2004 06:38 AM

Maybe I'm not following the process here but would it not allow for 10 ten days for correction? While it's certainly possible to loose an occasional member, if they are even semi-active they will know they did not receive the activation notice, the usergroup permissions would not have changed to allow regular member access, plus they would have to make the same exact error in their email address twice to change it. Just seems like pretty slim odds to me.

Bryan Ex 06-14-2004 02:18 PM

User activationid's are not being included in the email notices for my board. Is this query correct as there is no activationid field in the user table;

PHP Code:

        SELECT username,user.userid,email,joindate,activationid 
        FROM user
        LEFT JOIN useractivation ON 
(user.userid=useractivation.userid)
        
WHERE user.usergroupid=


sabret00the 06-15-2004 07:04 AM

i'm looking into this now, the query is correct as it pulls the column correctly but it's just coming up null, i should have an update by the end of the day.

Bryan Ex 06-15-2004 07:43 AM

Okay... cool. The other thing I was wondering about is it doesn't seem to list in the cron log files unless I run it manually. It's certainly working as I have no unactivated accounts over the time limit... just no logs to indicate it. Anything that I would need to change to have it running from my includes/cron/ directory? I compared log_cron_action to another script that was being logged and they seem the same to me.

psico 07-21-2004 09:39 AM

Quote:

Originally Posted by Bryan Ex
User activationid's are not being included in the email notices for my board. Is this query correct as there is no activationid field in the user table;

PHP Code:

        SELECT username,user.userid,email,joindate,activationid 
        FROM user
        LEFT JOIN useractivation ON 
(user.userid=useractivation.userid)
        
WHERE user.usergroupid=


This is the solution for this problem, I?ve got it from activate.php:

IN manageActivation.php
Under this:
PHP Code:

         while ($user=$DB_site->fetch_array($userArray))
        { 

Insert this code:
PHP Code:

        // make random number
        
if (empty($user['activationid']))
        { 
//none exists so create one
                
$user['activationid'] = vbrand(0100000000);
                
$DB_site->query("
                        INSERT INTO " 
TABLE_PREFIX "useractivation
                        VALUES
                        (NULL , 
$user[userid], " TIMENOW ", $user[activationid], 0, 2)
                "
);
                echo (
"ActivationID created to "$user[username]."<br>");
        }
        else
        {
                
$user['activationid'] = vbrand(0100000000);
                
$DB_site->query("
                        UPDATE " 
TABLE_PREFIX "useractivation SET
                        dateline = " 
TIMENOW ",
                        activationid = 
$user[activationid]
                        WHERE userid = 
$user[userid] AND type = 0
                "
);
                echo (
"ActivationID updated to "$user[username]."<br>");
        } 

There is another problem with this hack, if someone change the email address the account is deleted inmediatly because the registration date is more than 10 days old...this is CRITICAL!

So the quick solution to this is to change the query like this:

Code:

SELECT username,user.userid,email,joindate,activationid
                                FROM user
                                LEFT JOIN useractivation ON (user.userid=useractivation.userid)
                                WHERE user.usergroupid=3 AND user.posts = 0

So if the user have 1 or more posts the account is not deleted.

See ya.

sabret00the 07-21-2004 10:05 AM

completely forgot about htis, i'll issue an update :) thank you psico :)


All times are GMT. The time now is 05:20 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.01499 seconds
  • Memory Usage 1,767KB
  • 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
  • (1)bbcode_code_printable
  • (6)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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