mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-03-25 00:27:32 +01:00
Show the last 5 characters of the token secrets on the user settings page to make identification of a token easier
This commit is contained in:
@@ -182,5 +182,14 @@ class ApiToken
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the last 4 characters of the token secret, which can be used to identify the token.
|
||||
* @return string
|
||||
*/
|
||||
public function getLastTokenChars(): string
|
||||
{
|
||||
return substr($this->token, -4);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user