diff options
author | Joas Schilling <coding@schilljs.com> | 2020-10-14 17:17:53 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2020-10-30 12:38:07 +0300 |
commit | 2ae99269f491c92a638e7bbad592d1913c1227ef (patch) | |
tree | fdf5c296f0d671ed28a7252a2a700c71b97b1853 /lib/Manager.php | |
parent | 89bdbe0c51a509891a70c4a84b0c92d0c6825319 (diff) |
Check if the SIP is configured
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Manager.php')
-rw-r--r-- | lib/Manager.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Manager.php b/lib/Manager.php index 9cc3dc0da..fb8147f88 100644 --- a/lib/Manager.php +++ b/lib/Manager.php @@ -50,6 +50,8 @@ class Manager { private $db; /** @var IConfig */ private $config; + /** @var Config */ + private $talkConfig; /** @var ISecureRandom */ private $secureRandom; /** @var IUserManager */ @@ -69,6 +71,7 @@ class Manager { public function __construct(IDBConnection $db, IConfig $config, + Config $talkConfig, ISecureRandom $secureRandom, IUserManager $userManager, CommentsManager $commentsManager, @@ -79,6 +82,7 @@ class Manager { IL10N $l) { $this->db = $db; $this->config = $config; + $this->talkConfig = $talkConfig; $this->secureRandom = $secureRandom; $this->userManager = $userManager; $this->commentsManager = $commentsManager; @@ -806,10 +810,9 @@ class Manager { * @return string */ protected function getNewToken(): string { - $sipConfig = $this->config->getAppValue('spreed', 'sip_config', ''); // FIXME adjust config name $entropy = (int) $this->config->getAppValue('spreed', 'token_entropy', 8); $entropy = max(8, $entropy); // For update cases - $digitsOnly = $sipConfig !== ''; + $digitsOnly = $this->talkConfig->isSIPConfigured(); if ($digitsOnly) { // Increase default token length as we only use numbers $entropy = max(10, $entropy); |