$u = DB_DataObject::factory($tbl);
$s = DB_DataObject::factory('core_setting');
$require_oath_val = 1;
- $require_oath = $s->lookup('core', 'two_factor_authentication_requirement');
+ $require_oath = $s->lookup('core', 'two_factor_auth_required');
if(!empty($require_oath)) {
if($require_oath->val == 0) {
$require_oath_val = 0;
if (!$u->isAuth()) {
$this->jok(array(
- 'id' => 0,
- 'require_oath' => 0
+ 'id' => 0
));
exit;
}
$this->bcc = $bcc;
$this->rcpts = $u->getEmailFrom();
- $ret = $cm->send($this);
- //$this->jerr(print_r($r->toData(),true));
-
- if (is_object($ret)) {
- $this->addEvent('SYSERR',false, $ret->getMessage());
+
+ $mailer = $cm->toMailer($this, false);
+ if (is_a($mailer,'PEAR_Error') ) {
+ $this->addEvent('SYSERR',false, $mailer->getMessage());
+ $this->jerr($mailer->getMessage());
+ }
+ $sent = $mailer->send();
+ if (is_a($sent,'PEAR_Error') ) {
+ $this->addEvent('SYSERR',false, $sent->getMessage());
$this->jerr($ret->getMessage());
}
+
$this->addEvent('PASSREQ',$u, $u->email);
$uu = clone($u);
$uu->no_reset_sent++;