mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 09:35:49 +02:00
[Eventlog] Show extra data in log table.
This commit is contained in:
parent
f7d0524f57
commit
8b1eccc48d
12 changed files with 351 additions and 2 deletions
|
@ -31,4 +31,24 @@ use Doctrine\ORM\Mapping as ORM;
|
|||
class UserLoginLogEntry extends AbstractLogEntry
|
||||
{
|
||||
protected $typeString = "user_login";
|
||||
|
||||
/**
|
||||
* Return the (anonymized) IP address used to login the user.
|
||||
* @return string
|
||||
*/
|
||||
public function getIPAddress(): string
|
||||
{
|
||||
return $this->extra['i'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the IP address used to login the user
|
||||
* @param string $ip The IP address used to login the user.
|
||||
* @return $this
|
||||
*/
|
||||
public function setIPAddress(string $ip): self
|
||||
{
|
||||
$this->extra['i'] = $ip;
|
||||
return $this;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue