Commit 07dbb2c0 authored by Nigel McNie's avatar Nigel McNie

Merge branch '0.8_STABLE' of git+ssh://git.catalyst.net.nz/git/public/mahara into 0.8_STABLE

parents bbbce3af 2ef5a346
......@@ -188,7 +188,15 @@ class AuthXmlrpc extends Auth {
set_profile_field($user->id, 'lastname', $user->lastname);
set_profile_field($user->id, 'email', $user->email);
handle_event('createuser', $user);
/*
* We need to convert the object to a stdclass with its own
* custom method because it uses overloaders in its implementation
* and its properties wouldn't be visible to a simple cast operation
* like (array)$user
*/
$userobj = $user->to_stdclass();
$userarray = (array)$userobj;
handle_event('createuser', $userarray);
} elseif ($update) {
......
......@@ -129,9 +129,14 @@ if (!isset($CFG->wwwroot) && isset($_SERVER['HTTP_HOST'])) {
}
$path = substr(dirname(__FILE__), strlen($_SERVER['DOCUMENT_ROOT']));
if ($path) {
if (substr($path, 0, 1) != '/') {
$path = '/' . $path;
}
$path .= '/';
} else {
$path = '/';
}
$wwwroot = $proto . $host . '/' . $path;
$wwwroot = $proto . $host . $path;
try {
set_config('wwwroot', $wwwroot);
}
......
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