Inizio dockerizzazione
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
/*
|
||||
Author: Riccardo Di Dato
|
||||
Creation Date: 17/mar/2016
|
||||
*/
|
||||
|
||||
|
||||
class GenerateUserPasswordRecoveryMailTask extends Task {
|
||||
public static function getName(){
|
||||
return "generateUserPasswordRecovery";
|
||||
}
|
||||
|
||||
public static function getLabel(){
|
||||
return "Genera email di recupero password per gli utenti";
|
||||
}
|
||||
|
||||
public static function execute(){
|
||||
$requests = GlobalVariables::get("dao")->query("PasswordRecoveryRequestModel",array("sent"=>false,"target.class"=>"UserModel"),array("limit"=>10));
|
||||
if(sizeof($requests)>0){
|
||||
foreach ($requests as $request){
|
||||
$mail = FDN_MailHelper::getUserPasswordResetMail($request);
|
||||
GlobalVariables::get("dao")->save($mail);
|
||||
$request->sent = true;
|
||||
GlobalVariables::get("dao")->save($request);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user