You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ae3-auth/src/app/Traits/HasPasswordValidation.php

14 lines
316 B
PHP

<?php
namespace Pablo\Ae3auth\app\Traits;
use Carbon\Carbon;
trait HasPasswordValidation
{
public function passwordExpired()
{
$passwordExpiresAtColumn = config('ae3auth-config.user.expires_password_column_name');
return Carbon::now()->greaterThan($this->$passwordExpiresAtColumn);
}
}