vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   There is a way to insert in cron the userupdate? (https://vborg.vbsupport.ru/showthread.php?t=294331)

RedFoxy 01-24-2013 02:06 PM

There is a way to insert in cron the userupdate?
 
I use to assign a rank to specific usergroup, that rank is an image for user that give us a donation for the current year, but when I add an user in the secondary usergroup, to give them they user rank I must run a manteinance script to update user ranks title, there is a way to run it by shell or in forum cron?

kh99 01-24-2013 05:11 PM

You'd have to do some coding, I think. If you look at admincp/misc.php and find the section labeled "Start update user" you can see how it's done when you do it from the Maintenance menu, so you could use that code. It is written to do only a certain number of users per page so you'd have to figure out how to deal with that.

And you could either create your own php file in includes/cron and create a scheduled task for it, or you could create a plugin using hook cron_script_cleanup_daily or _hourly if you don't want to go through the trouble of making your own script.

RedFoxy 01-25-2013 02:24 PM

but how can I do for login and auth?

kh99 01-25-2013 02:27 PM

Sorry, I'm not sure what you're asking.

RedFoxy 01-25-2013 05:39 PM

misc.php need admin hash to check if you are logged in admincp, than the system checks if you have right permission, after that you can do the updates

kh99 01-25-2013 05:55 PM

Oh, I see what you mean. I was suggesting that you could copy some code from misc.php and put it somewhere else, so that it would be run by a cron job. But it's true that it takes some php programming ability to do that. Otherwise, I'm not sure what you could. I guess it would be possible to set something up that was automated and could login in as an admin and execute the existing misc.php, but I'm not sure how to do that.


All times are GMT. The time now is 05:00 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.01165 seconds
  • Memory Usage 1,709KB
  • 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)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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