diff options
Diffstat (limited to 'apps/provisioning_api')
-rw-r--r-- | apps/provisioning_api/lib/users.php | 2 | ||||
-rw-r--r-- | apps/provisioning_api/tests/userstest.php | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/apps/provisioning_api/lib/users.php b/apps/provisioning_api/lib/users.php index a385f2c1180..efb10a50865 100644 --- a/apps/provisioning_api/lib/users.php +++ b/apps/provisioning_api/lib/users.php @@ -285,7 +285,7 @@ class Users { break; case 'email': if(filter_var($parameters['_put']['value'], FILTER_VALIDATE_EMAIL)) { - $this->config->setUserValue($targetUserId, 'settings', 'email', $parameters['_put']['value']); + $targetUser->setEMailAddress($parameters['_put']['value']); } else { return new OC_OCS_Result(null, 102); } diff --git a/apps/provisioning_api/tests/userstest.php b/apps/provisioning_api/tests/userstest.php index 25e723a13b4..3ce13181b8d 100644 --- a/apps/provisioning_api/tests/userstest.php +++ b/apps/provisioning_api/tests/userstest.php @@ -932,10 +932,10 @@ class UsersTest extends OriginalTest { ->method('get') ->with('UserToEdit') ->will($this->returnValue($targetUser)); - $this->config + $targetUser ->expects($this->once()) - ->method('setUserValue') - ->with('UserToEdit', 'settings', 'email', 'demo@owncloud.org'); + ->method('setEMailAddress') + ->with('demo@owncloud.org'); $expected = new \OC_OCS_Result(null, 100); $this->assertEquals($expected, $this->api->editUser(['userid' => 'UserToEdit', '_put' => ['key' => 'email', 'value' => 'demo@owncloud.org']])); |