X-Git-Url: http://git.roojs.org/?p=Pman.Core;a=blobdiff_plain;f=SendIntro.php;h=c3187f19293c0359ce810018254c874399fced77;hp=be055fbd0d5e786cb58c30bd4db9b14a9dfde9f8;hb=1524f8b36295809a3eedd6da3c6494f8aa0d86f5;hpb=5e48483a0bb95f4c99fea9d80fe6384303abf603 diff --git a/SendIntro.php b/SendIntro.php index be055fbd..c3187f19 100644 --- a/SendIntro.php +++ b/SendIntro.php @@ -36,7 +36,7 @@ class Pman_Core_SendIntro extends Pman return true; } - function post() + function post($v) { //DB_DataObject::debuglevel(1); // gets id : c.id, rawPasswd: c.rawPasswd @@ -44,7 +44,7 @@ class Pman_Core_SendIntro extends Pman if (!$this->hasPerm("Core.Person", "A")) { $this->jerr("Not Permitted - no permission to add users."); } - $p = DB_DataObject::factory('Person'); + $p = DB_DataObject::factory('core_person'); // let's make a password anyway.. $rawPasswd = false; @@ -63,7 +63,7 @@ class Pman_Core_SendIntro extends Pman if ($p->get('email', $_REQUEST['email'])) { $this->jerr("duplicate email address:" .$_REQUEST['email']); } - $p = DB_DataObject::factory('Person'); + $p = DB_DataObject::factory('core_person'); $p->setFrom($_REQUEST); if ($rawPasswd == false) { @@ -81,7 +81,7 @@ class Pman_Core_SendIntro extends Pman } - $p = DB_DataObject::factory('Person'); + $p = DB_DataObject::factory('core_person'); if (!$id || !$p->get($_REQUEST['id'])) { $this->jerr("Invalid user id"); @@ -95,12 +95,15 @@ class Pman_Core_SendIntro extends Pman // next.. - $p->sendTemplate('password_welcome', array( + $ret = $p->sendTemplate('password_welcome', array( 'sender' => $this->authUser, 'rawPasswd' => $rawPasswd, 'baseURL' => $this->baseURL, )); - + if (is_object($ret)) { + $this->jerr($ret->toString()); + + } $this->jok("SENT");