Skip to content

Commit

Permalink
Fix updating user settings
Browse files Browse the repository at this point in the history
The requests dispatched from the personal settings page don't always
send all the possible params but just a subset. Hence requests currently
fail on master e.g. when you update your email. This makes the arguments
optional again.

Regression of da9462b

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
  • Loading branch information
ChristophWurst authored and rullzer committed Dec 30, 2020
1 parent c96bb21 commit 4c3105b
Showing 1 changed file with 27 additions and 26 deletions.
53 changes: 27 additions & 26 deletions apps/settings/lib/Controller/UsersController.php
Original file line number Diff line number Diff line change
Expand Up @@ -333,34 +333,35 @@ protected function canAdminChangeUserPasswords(): bool {
* @NoSubAdminRequired
* @PasswordConfirmationRequired
*
* @param string $avatarScope
* @param string $displayname
* @param string $displaynameScope
* @param string $phone
* @param string $phoneScope
* @param string $email
* @param string $emailScope
* @param string $website
* @param string $websiteScope
* @param string $address
* @param string $addressScope
* @param string $twitter
* @param string $twitterScope
* @param string|null $avatarScope
* @param string|null $displayname
* @param string|null $displaynameScope
* @param string|null $phone
* @param string|null $phoneScope
* @param string|null $email
* @param string|null $emailScope
* @param string|null $website
* @param string|null $websiteScope
* @param string|null $address
* @param string|null $addressScope
* @param string|null $twitter
* @param string|null $twitterScope
*
* @return DataResponse
*/
public function setUserSettings(string $avatarScope,
string $displayname,
string $displaynameScope,
string $phone,
string $phoneScope,
string $email,
string $emailScope,
string $website,
string $websiteScope,
string $address,
string $addressScope,
string $twitter,
string $twitterScope
public function setUserSettings(?string $avatarScope = null,
?string $displayname = null,
?string $displaynameScope = null,
?string $phone = null,
?string $phoneScope = null,
?string $email = null,
?string $emailScope = null,
?string $website = null,
?string $websiteScope = null,
?string $address = null,
?string $addressScope = null,
?string $twitter = null,
?string $twitterScope = null
) {
$email = strtolower($email);
if (!empty($email) && !$this->mailer->validateMailAddress($email)) {
Expand Down

0 comments on commit 4c3105b

Please sign in to comment.