mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-10-31 01:23:32 +03:00
Nextcloud only handle POST data when there' s a user
This commit is contained in:
parent
a013cb949d
commit
c233269f47
1 changed files with 8 additions and 7 deletions
|
|
@ -105,14 +105,15 @@ class FetchController extends Controller {
|
|||
$sEmail = '';
|
||||
if (isset($_POST['appname'], $_POST['snappymail-password'], $_POST['snappymail-email']) && 'snappymail' === $_POST['appname']) {
|
||||
$sUser = SnappyMailHelper::getUID();
|
||||
if ($sUser) {
|
||||
$sEmail = $_POST['snappymail-email'];
|
||||
$this->config->setUserValue($sUser, 'snappymail', 'snappymail-email', $sEmail);
|
||||
|
||||
$sEmail = $_POST['snappymail-email'];
|
||||
$this->config->setUserValue($sUser, 'snappymail', 'snappymail-email', $sEmail);
|
||||
|
||||
$sPass = $_POST['snappymail-password'];
|
||||
if ('******' !== $sPass) {
|
||||
$this->config->setUserValue($sUser, 'snappymail', 'passphrase',
|
||||
$sPass ? SnappyMailHelper::encodePassword($sPass, \md5($sEmail)) : '');
|
||||
$sPass = $_POST['snappymail-password'];
|
||||
if ('******' !== $sPass) {
|
||||
$this->config->setUserValue($sUser, 'snappymail', 'passphrase',
|
||||
$sPass ? SnappyMailHelper::encodePassword($sPass, \md5($sEmail)) : '');
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return new JSONResponse([
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue