Commit d8b27ac1 authored by Martyn Smith's avatar Martyn Smith Committed by Martyn Smith
Browse files

Added cronjob to delete unvalidated emails from profile

parent a0b21784
......@@ -71,6 +71,20 @@ class PluginArtefactInternal extends PluginArtefact {
);
}
public static function get_cron() {
return array(
(object)array(
'callfunction' => 'clean_email_validations',
'hour' => '4',
'minute' => '10',
),
);
}
public static function clean_email_validations() {
delete_records_select('artefact_internal_profile_email', 'verified=0 AND expiry IS NOT NULL AND expiry < ?', array(db_format_timestamp(time())));
}
public static function get_toplevel_artefact_types() {
return array('profile');
}
......
......@@ -713,7 +713,7 @@ class Plugin {
/**
* This function returns an array of crons it wants to have run
* Each item should be a StdtClass object containing -
* Each item should be a StdClass object containing -
* - callfunction (static function on the Plugin Class)
* - any or all of minute, hour, day, month, dayofweek
* (will default to * if not supplied)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment