Fix auto-login (avoid multiple confirmation emails)
This commit is contained in:
13
inc/spot.php
13
inc/spot.php
@@ -48,7 +48,8 @@ class Spot extends Main
|
||||
array('name'=>'project', 'project'=>true),
|
||||
array('name'=>'media', 'project'=>true),
|
||||
array('name'=>'converter', 'project'=>true),
|
||||
array('name'=>'user', 'project'=>true)
|
||||
array('name'=>'user', 'project'=>true),
|
||||
array('name'=>'email', 'project'=>true)
|
||||
);
|
||||
parent::__construct($oClassManagement, $sProcessPage, $asClasses, true, __FILE__, $sTimezone);
|
||||
|
||||
@@ -172,7 +173,7 @@ class Spot extends Main
|
||||
}
|
||||
|
||||
public function genCronFile() {
|
||||
//$bResult = (file_put_contents('spot_cron.sh', '#!/bin/bash'."\n".'cd '.dirname($_SERVER['SCRIPT_FILENAME'])."\n".'php -f index.php a=update_feed')!==false);
|
||||
//$bSuccess = (file_put_contents('spot_cron.sh', '#!/bin/bash'."\n".'cd '.dirname($_SERVER['SCRIPT_FILENAME'])."\n".'php -f index.php a=update_feed')!==false);
|
||||
$sFileName = 'spot_cron.sh';
|
||||
$sContent =
|
||||
'#!/bin/bash'."\n".
|
||||
@@ -215,16 +216,16 @@ class Spot extends Main
|
||||
|
||||
public function subscribe($sEmail) {
|
||||
$asResult = $this->oUser->addUser($sEmail, $this->oLang->getLanguage());
|
||||
$asUserInfo = $this->oUser->getUserInfo();
|
||||
|
||||
//Send Confirmation Email
|
||||
if($asResult['result']) {
|
||||
$this->oClassManagement->incClass('email', true);
|
||||
if($asResult['result'] && $asResult['desc']=='lang:nl_subscribed') {
|
||||
$oConfEmail = new Email($this->asContext['serv_name'], 'email_confirmation');
|
||||
$oConfEmail->setDestInfo($this->oUser->getUserInfo());
|
||||
$oConfEmail->setDestInfo($asUserInfo);
|
||||
$oConfEmail->send();
|
||||
}
|
||||
|
||||
return self::getJsonResult($asResult['result'], $asResult['desc'], $asResult['data']);
|
||||
return self::getJsonResult($asResult['result'], $asResult['desc'], $asUserInfo);
|
||||
}
|
||||
|
||||
public function unsubscribe() {
|
||||
|
||||
@@ -59,7 +59,7 @@ class User extends PhpObject {
|
||||
$this->updateCookie();
|
||||
}
|
||||
|
||||
return Spot::getResult($bSuccess, $sDesc, $this->getUserInfo());
|
||||
return Spot::getResult($bSuccess, $sDesc);
|
||||
}
|
||||
|
||||
public function removeUser() {
|
||||
|
||||
Reference in New Issue
Block a user