Roundmail::checkReminder automailing system
This commit is contained in:
parent
6aad1a7ab2
commit
1f5e056b7f
18 changed files with 269 additions and 116 deletions
|
|
@ -20,7 +20,7 @@ class User extends Authenticatable
|
|||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'name', 'firstname', 'lastname', 'email', 'password',
|
||||
'name', 'firstname', 'lastname', 'email', 'password', 'gets_reminders'
|
||||
];
|
||||
|
||||
/**
|
||||
|
|
@ -135,10 +135,14 @@ class User extends Authenticatable
|
|||
$games = Game::where('round_id','=',$round_id)->get();
|
||||
|
||||
foreach ($games as $game) {
|
||||
|
||||
|
||||
$tipp = Tipp::where([['game_id','=',$game->id],['user_id','=',$user_id]])->first();
|
||||
|
||||
//if(!$tipp) { Log::info("Tipp doesnt exist: game_id=".$game->id.", user_id=".$user_id); }
|
||||
|
||||
if ($tipp->score1 == -1 || $tipp->score2 == -1) {
|
||||
Log::info("!!! User ".$user_id." has a missing tipp for game_id ".$game->id.", round = ".$round_id);
|
||||
//Log::info("!!! User ".$user_id." has a missing tipp for game_id ".$game->id.", round = ".$round_id);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
|
@ -153,9 +157,8 @@ class User extends Authenticatable
|
|||
|
||||
$tipp = Tipp::where([['game_id','=',$game->id],['user_id','=',$user_id]])->first();
|
||||
|
||||
|
||||
if(!$tipp) {
|
||||
Log::info("tipp is null! OMG! // Infos: user_id=".$user_id.", game_id=".$game->id.", round_id=".$round_id);
|
||||
//Log::info("tipp is null! OMG! // Infos: user_id=".$user_id.", game_id=".$game->id.", round_id=".$round_id);
|
||||
}
|
||||
|
||||
if ($tipp->joker == true) { $joker=1; }
|
||||
|
|
@ -165,7 +168,7 @@ class User extends Authenticatable
|
|||
if ($joker==1) {
|
||||
return false;
|
||||
}
|
||||
Log::info("!!! Joker is missing for user_id=".$user_id." round_id=".$round_id);
|
||||
//Log::info("!!! Joker is missing for user_id=".$user_id." round_id=".$round_id);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue