diff --git a/modules/popup-dialog.php b/modules/popup-dialog.php index 61efd4c9..4c8c92b5 100644 --- a/modules/popup-dialog.php +++ b/modules/popup-dialog.php @@ -654,11 +654,13 @@ print ""; print ""; - $result = db_query($link, "SELECT email FROM ttrss_users WHERE + $result = db_query($link, "SELECT email, full_name FROM ttrss_users WHERE id = " . $_SESSION["uid"]); $user_email = htmlspecialchars(db_fetch_result($result, 0, "email")); - $user_name = htmlspecialchars($_SESSION["name"]); + $user_name = htmlspecialchars(db_fetch_result($result, 0, "full_name")); + + if (!$user_name) $user_name = $_SESSION['name']; $_SESSION['email_replyto'] = $user_email; $_SESSION['email_fromname'] = $user_name; diff --git a/modules/pref-prefs.php b/modules/pref-prefs.php index dc658956..5fcb9311 100644 --- a/modules/pref-prefs.php +++ b/modules/pref-prefs.php @@ -123,12 +123,14 @@ } else if ($subop == "change-email") { $email = db_escape_string($_POST["email"]); + $full_name = db_escape_string($_POST["full_name"]); + $active_uid = $_SESSION["uid"]; - db_query($link, "UPDATE ttrss_users SET email = '$email' - WHERE id = '$active_uid'"); + db_query($link, "UPDATE ttrss_users SET email = '$email', + full_name = '$full_name' WHERE id = '$active_uid'"); - print __("E-mail has been changed."); + print __("Your personal data has been saved."); return; @@ -197,11 +199,20 @@ print "
".__("Personal data")." | ||
".__('Full name')." | "; + print "||
".__('E-mail')." | "; print "";
print " "; + __("Save data").""; print " |