} } if ($new_User->dbinsert()) { // Insert system log about user's registration syslog_insert('User registration', 'info', 'user', $new_User->ID); } $new_user_ID = $new_User->ID; // we need this to "rollback" user creation if there's no DB transaction support // TODO: Optionally auto create a blog (handle this together with the LDAP plugin) // TODO: Optionally auto assign rights // Actions to be appended to the user registration transaction: if ($Plugins->trigger_event_first_false('AppendUserRegistrTransact', array('User' => &$new_User))) { // TODO: notify the plugins that have been called before about canceling of the event?! $DB->rollback(); // Delete, in case there's no transaction support: $new_User->dbdelete($Debuglog); $Messages->add(T_('No user account has been created!'), 'error'); break; // break out to _reg_form.php } // User created: $DB->commit(); $UserCache->add($new_User); $initial_hit = $new_User->get_first_session_hit_params($Session->ID); if (!empty($initial_hit)) { // Save User Settings $UserSettings->set('initial_blog_ID', $initial_hit->hit_coll_ID, $new_User->ID); $UserSettings->set('initial_URI', $initial_hit->hit_uri, $new_User->ID); $UserSettings->set('initial_referer', $initial_hit->hit_referer, $new_User->ID); } if (!empty($session_registration_trigger_url)) {