Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
d8b27ac1
Commit
d8b27ac1
authored
Dec 18, 2006
by
Martyn Smith
Committed by
Martyn Smith
Dec 18, 2006
Browse files
Added cronjob to delete unvalidated emails from profile
parent
a0b21784
Changes
2
Show whitespace changes
Inline
Side-by-side
htdocs/artefact/internal/lib.php
View file @
d8b27ac1
...
@@ -71,6 +71,20 @@ class PluginArtefactInternal extends PluginArtefact {
...
@@ -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
()
{
public
static
function
get_toplevel_artefact_types
()
{
return
array
(
'profile'
);
return
array
(
'profile'
);
}
}
...
...
htdocs/lib/mahara.php
View file @
d8b27ac1
...
@@ -713,7 +713,7 @@ class Plugin {
...
@@ -713,7 +713,7 @@ class Plugin {
/**
/**
* This function returns an array of crons it wants to have run
* This function returns an array of crons it wants to have run
* Each item should be a Std
t
Class object containing -
* Each item should be a StdClass object containing -
* - callfunction (static function on the Plugin Class)
* - callfunction (static function on the Plugin Class)
* - any or all of minute, hour, day, month, dayofweek
* - any or all of minute, hour, day, month, dayofweek
* (will default to * if not supplied)
* (will default to * if not supplied)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment