Ranking: Changing degree of headings

This commit is contained in:
Torsten 2017-11-30 11:07:27 +01:00
parent faf00dc0cb
commit abf66ea3c9
5 changed files with 74 additions and 31 deletions

View file

@ -37,9 +37,12 @@ class User extends Authenticatable
// Only the current season.
public static function is_season_paid($user_id) {
public static function is_season_paid($user_id,$seasonId=-1) {
$season=Season::getCurrent();
if ($seasonId!=-1) { $season=Season::where('id','=',$seasonId)->first();}
$retval="Ja";
if (User::payment_date($user_id, Season::getCurrent()->id)==null) { $retval="Nein"; }
if (User::payment_date($user_id, $season->id)==null) { $retval="Nein"; }
return $retval;
}
@ -217,6 +220,13 @@ class User extends Authenticatable
}
public static function isDeleted($user_id) {
$user=User::where('id','=',$user_id)->first();
if (!$user) return true;
if ($user->deleted) return true;
return false;
}
public static function softDelete($user_id) {
$user = User::where('id','=',$user_id)->first();
if ($user) { $user->deleted = Carbon\Carbon::now();}
@ -228,7 +238,7 @@ class User extends Authenticatable
public static function getNames() {
$users=User::getActives();
$users=User::all();
$usernames = array();
foreach($users as $user) {
$usernames[$user->id] = $user->name;