mirror of
https://github.com/nextcloud/server.git
synced 2026-06-12 18:21:40 -04:00
fix: Remove a static var usage in encryption application
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
c88a1d3961
commit
5c935429ef
1 changed files with 4 additions and 5 deletions
|
|
@ -21,9 +21,8 @@ use OCP\IUserSession;
|
|||
use Psr\Log\LoggerInterface;
|
||||
|
||||
class PassphraseService {
|
||||
|
||||
/** @var array<string, bool> */
|
||||
private static array $passwordResetUsers = [];
|
||||
private array $passwordResetUsers = [];
|
||||
|
||||
public function __construct(
|
||||
private Util $util,
|
||||
|
|
@ -39,9 +38,9 @@ class PassphraseService {
|
|||
|
||||
public function setProcessingReset(string $uid, bool $processing = true): void {
|
||||
if ($processing) {
|
||||
self::$passwordResetUsers[$uid] = true;
|
||||
$this->passwordResetUsers[$uid] = true;
|
||||
} else {
|
||||
unset(self::$passwordResetUsers[$uid]);
|
||||
unset($this->passwordResetUsers[$uid]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -51,7 +50,7 @@ class PassphraseService {
|
|||
public function setPassphraseForUser(string $userId, string $password, ?string $recoveryPassword = null): bool {
|
||||
// if we are in the process to resetting a user password, we have nothing
|
||||
// to do here
|
||||
if (isset(self::$passwordResetUsers[$userId])) {
|
||||
if (isset($this->passwordResetUsers[$userId])) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue