diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2019-06-14 17:28:50 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2019-06-19 17:04:35 +0200 |
commit | bbe2f2535a5207b2b998cae8079a488541baf100 (patch) | |
tree | 8766f9169debcceae878d43bae97e8ae6d8314db /apps/provisioning_api | |
parent | 660fbd64e34fccb26f1a38d1b67da5618e624875 (diff) | |
download | nextcloud-server-bbe2f2535a5207b2b998cae8079a488541baf100.tar.gz nextcloud-server-bbe2f2535a5207b2b998cae8079a488541baf100.zip |
makes users management page aware of the introduced options
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'apps/provisioning_api')
-rw-r--r-- | apps/provisioning_api/lib/Controller/UsersController.php | 4 | ||||
-rw-r--r-- | apps/provisioning_api/tests/Controller/UsersControllerTest.php | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/apps/provisioning_api/lib/Controller/UsersController.php b/apps/provisioning_api/lib/Controller/UsersController.php index dfc9d188b5c..28ab99a0ee0 100644 --- a/apps/provisioning_api/lib/Controller/UsersController.php +++ b/apps/provisioning_api/lib/Controller/UsersController.php @@ -237,7 +237,7 @@ class UsersController extends AUserData { $isAdmin = $this->groupManager->isAdmin($user->getUID()); $subAdminManager = $this->groupManager->getSubAdmin(); - if(empty($userid) && (bool)$this->config->getAppValue('settings', 'newUser.generateUserID', false)) { + if(empty($userid) && $this->config->getAppValue('settings', 'newUser.generateUserID', '0') === '1') { $userid = $this->createNewUserId(); } @@ -293,7 +293,7 @@ class UsersController extends AUserData { $generatePasswordResetToken = true; } - if ($email === '' && (bool)$this->config->getAppValue('settings', 'newUser.requireEmail', false)) { + if ($email === '' && $this->config->getAppValue('settings', 'newUser.requireEmail', '0') === '1') { throw new OCSException('Required email address was not provided', 110); } diff --git a/apps/provisioning_api/tests/Controller/UsersControllerTest.php b/apps/provisioning_api/tests/Controller/UsersControllerTest.php index b064f019f09..eaee0380f78 100644 --- a/apps/provisioning_api/tests/Controller/UsersControllerTest.php +++ b/apps/provisioning_api/tests/Controller/UsersControllerTest.php @@ -483,7 +483,7 @@ class UsersControllerTest extends TestCase { ->method('getAppValue') ->willReturnCallback(function($appid, $key, $default) { if($key === 'newUser.generateUserID') { - return true; + return '1'; } return null; }); @@ -526,7 +526,7 @@ class UsersControllerTest extends TestCase { ->method('getAppValue') ->willReturnCallback(function($appid, $key, $default) { if($key === 'newUser.requireEmail') { - return true; + return '1'; } return null; }); |