vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Mass Changing User Group for Older Users (https://vborg.vbsupport.ru/showthread.php?t=318564)

ShannonA 05-06-2015 01:27 AM

Mass Changing User Group for Older Users
 
I'm trying to clean up our site's mailing database, so that we can better mail to people who remain active on the site. The best idea I've come up with is to move old, unused accounts out of the Registered user group ... say to the "Users Awaiting Email Confirmation" group, which I presume would make them reverify their email address before they could log back in.

Any problems with that methodology?

More importantly, is there an easy way to flip all users who haven't logged in, for, say 3 years to "Users Awaiting Email Confirmation" as their primary group?

MarkFL 05-06-2015 03:18 AM

Quote:

Originally Posted by ShannonA (Post 2544960)
...More importantly, is there an easy way to flip all users who haven't logged in, for, say 3 years to "Users Awaiting Email Confirmation" as their primary group?

You could follow;

AdminCP ► Maintenance ► Execute SQL Query

And run the manual query:

Code:

UPDATE user set usergroupid = 3 where (usergroupid = 2 AND ((UNIX_TIMESTAMP() - lastactivity)/(86400*365) >= 3))
Note: Before running any manual queries, make sure you have a backup of your database in case things do not go as expected.


All times are GMT. The time now is 10:36 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.01057 seconds
  • Memory Usage 1,712KB
  • 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
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete