Use the session username when it is set

This commit is contained in:
FusionPBX 2023-04-17 11:22:27 -06:00 committed by GitHub
parent 6a556e55ad
commit 6bdab612b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -64,6 +64,12 @@ class plugin_email {
//temp directory
$_SESSION['server']['temp']['dir'] = '/tmp';
//use the session username
if (isset($_SESSION['username'])) {
$_POST['username'] = $_SESSION['username'];
$_REQUEST['username'] = $_SESSION['username'];
}
//request the username
if (!isset($_POST['username']) && !isset($_POST['authentication_code'])) {