mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Merge branch '1.6.x' into feat-free-sms-limit-authphone
This commit is contained in:
@@ -11,6 +11,7 @@ class Audit extends Event
|
||||
protected string $mode = '';
|
||||
protected string $userAgent = '';
|
||||
protected string $ip = '';
|
||||
protected string $hostname = '';
|
||||
|
||||
public function __construct(protected Connection $connection)
|
||||
{
|
||||
@@ -113,6 +114,30 @@ class Audit extends Event
|
||||
return $this->ip;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the hostname.
|
||||
*
|
||||
* @param string $hostname
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setHostname(string $hostname): self
|
||||
{
|
||||
$this->hostname = $hostname;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the hostname.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getHostname(): string
|
||||
{
|
||||
return $this->hostname;
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes the event and sends it to the audit worker.
|
||||
*
|
||||
@@ -136,6 +161,7 @@ class Audit extends Event
|
||||
'ip' => $this->ip,
|
||||
'userAgent' => $this->userAgent,
|
||||
'event' => $this->event,
|
||||
'hostname' => $this->hostname
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user