private function createUser($registration) { $db = $this->env->db(); $plugin = $this->env->plugins()->getPlugin("Registration"); $permission = $plugin->getSetting("permission", Authentication::PERMISSION_VALUE_READONLY); $lang = $this->getPluginSetting("language", NULL); $id = $this->env->configuration()->addUser($registration['name'], $lang, $registration['email'], $permission, NULL); $this->env->configuration()->storeUserAuth($id, $registration['name'], NULL, $registration['password']); $db->update("DELETE from " . $db->table("registration") . " where `id`=" . $db->string($registration['id'], TRUE)); $this->addUserProperties($id, $registration['name'], $plugin); //if (file_exists("plugin/Registration/custom/CustomRegistrationHandler.php")) include("custom/CustomRegistrationHandler.php"); //if (function_exists("onConfirmCustomData")) onConfirmCustomData($registration, $id); $this->env->events()->onEvent(RegistrationEvent::userCreated($id, $registration['name'])); }
private function createUser($registration) { $db = $this->env->db(); $plugin = $this->env->plugins()->getPlugin("Registration"); $defaultPermission = $plugin->getSetting("permission", NULL); $lang = $this->getPluginSetting("language", NULL); $id = $this->env->configuration()->addUser($registration['name'], $lang, $registration['email'], NULL, NULL); $this->env->configuration()->storeUserAuth($id, $registration['name'], NULL, $registration['password'], $registration['password_hint']); if ($defaultPermission != NULL) { $this->env->permissions()->addFilesystemPermission(NULL, "filesystem_item_access", $id, $defaultPermission); } $db->update("DELETE from " . $db->table("registration") . " where `id`=" . $db->string($registration['id'], TRUE)); $this->addUserProperties($id, $registration, $plugin); //if (file_exists("plugin/Registration/custom/CustomRegistrationHandler.php")) include("custom/CustomRegistrationHandler.php"); //if (function_exists("onConfirmCustomData")) onConfirmCustomData($registration, $id); $this->env->events()->onEvent(RegistrationEvent::userCreated($id, $registration['name'], $registration['email'])); }