- debugging

parent c529af06
...@@ -214,12 +214,13 @@ class TriggerTrigger extends \common\components\ActiveRecordModel ...@@ -214,12 +214,13 @@ class TriggerTrigger extends \common\components\ActiveRecordModel
* @return string * @return string
*/ */
public function initAction($params=array()){ public function initAction($params=array()){
var_dump($params); if (array_key_exists('email', $params))
$email = (!Yii::$app->user->isGuest) ? Yii::$app->user->identity->email : null;
if ($email===null && array_key_exists('email', $params))
$email = $params['email']; $email = $params['email'];
else elseif(empty($email) && !Yii::$app->user->isGuest) {
$email = Yii::$app->user->identity->email;
} else {
return 'Email not found'; return 'Email not found';
}
/** @var \DateTime $time_now */ /** @var \DateTime $time_now */
$time_now=new \DateTime(); $time_now=new \DateTime();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment