Skip to content

Commit

Permalink
fixes #1313 replace curly braces by brackets
Browse files Browse the repository at this point in the history
  • Loading branch information
plegall committed Feb 5, 2021
1 parent 9c1f6c0 commit b63ecd1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions profile.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,15 +185,15 @@ function save_profile_from_post($userdata, &$errors)
$fields = array($conf['user_fields']['email']);

$data = array();
$data{$conf['user_fields']['id']} = $userdata['id'];
$data{$conf['user_fields']['email']} = $_POST['mail_address'];
$data[ $conf['user_fields']['id'] ] = $userdata['id'];
$data[ $conf['user_fields']['email'] ] = $_POST['mail_address'];

// password is updated only if filled
if (!empty($_POST['use_new_pwd']))
{
$fields[] = $conf['user_fields']['password'];
// password is hashed with function $conf['password_hash']
$data{$conf['user_fields']['password']} = $conf['password_hash']($_POST['use_new_pwd']);
$data[ $conf['user_fields']['password'] ] = $conf['password_hash']($_POST['use_new_pwd']);

deactivate_user_auth_keys($userdata['id']);
}
Expand All @@ -209,7 +209,7 @@ function save_profile_from_post($userdata, &$errors)
else
{
$fields[] = $conf['user_fields']['username'];
$data{$conf['user_fields']['username']} = $_POST['username'];
$data[ $conf['user_fields']['username'] ] = $_POST['username'];

// send email to the user
if ($_POST['username'] != $userdata['username'])
Expand Down

0 comments on commit b63ecd1

Please sign in to comment.