$au = $this->getAuthUser();
if (!$au) {
- $this->jerr("Not authenticated", array('authFailure' => true));
+ $this->jerror("LOGIN-NOAUTH", "Not authenticated", array('authFailure' => true));
}
$this->authUser = $au;
// check that it's a supplier!!!!
return true;
}
- function post()
+ function post($v)
{
//DB_DataObject::debuglevel(1);
// gets id : c.id, rawPasswd: c.rawPasswd
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;
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) {
}
- $p = DB_DataObject::factory('Person');
+ $p = DB_DataObject::factory('core_person');
if (!$id || !$p->get($_REQUEST['id'])) {
$this->jerr("Invalid user id");
// 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");