mirror of
https://gitlab.com/signalytic/client-external/streamline/streamline-emr.git
synced 2026-09-13 11:41:31 +00:00
The official image from streamline does not currently work for the arm64 platform. As a temporary measure, the source code and docker build scripts have been lifted from the official images and are used to build locally. Some additional modifications are made to reduce overall image size, these are documented in docker/README.md
30 lines
766 B
PHP
Executable File
30 lines
766 B
PHP
Executable File
<?php
|
|
|
|
namespace Streamline\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class FailedLoginAttempt extends Model
|
|
{
|
|
protected $fillable = [
|
|
'user_id', 'email_address', 'username', 'ip_address',
|
|
];
|
|
|
|
protected $casts = [
|
|
'created_at' => 'datetime',
|
|
'updated_at' => 'datetime',
|
|
];
|
|
|
|
public static function record($user = null, $username, $ip)
|
|
{
|
|
$email_credential = User::where('username', $username)->first();
|
|
$email = $email_credential ? $email_credential->email : "";
|
|
return static::create([
|
|
'user_id' => is_null($user) ? null : $user->id,
|
|
'email_address' => $email ?? 'NA',
|
|
'username' => $username,
|
|
'ip_address' => $ip,
|
|
]);
|
|
}
|
|
}
|