diff --git a/web/documentserver-example/php/doceditor.php b/web/documentserver-example/php/doceditor.php
index 7b2319e2..6c90ea8f 100644
--- a/web/documentserver-example/php/doceditor.php
+++ b/web/documentserver-example/php/doceditor.php
@@ -48,7 +48,7 @@
{
$filename = tryGetDefaultByType($createExt);
- $new_url = "doceditor.php?fileID=" . $filename;
+ $new_url = "doceditor.php?fileID=" . $filename . "&user=" . $_GET["user"];
header('Location: ' . $new_url, true);
exit;
}
@@ -153,6 +153,8 @@
}
?>
+ var user = [{id:"0","name":"Jonn Smith","firstname":"John","lastname":"Smith"}, {id:"1","name":"Mark Pottato","firstname":"Mark","lastname":"Pottato"}, {id:"2","name":"Hamish Mitchell","firstname":"Hamish","lastname":"Mitchell"}]["" || 0];
+
docEditor = new DocsAPI.DocEditor("iframeEditor",
{
width: "100%",
@@ -183,11 +185,7 @@
callbackUrl: "",
- user: {
- id: "",
- firstname: "John",
- lastname: "Smith",
- },
+ user: user,
embedded: {
saveUrl: "",
diff --git a/web/documentserver-example/php/index.php b/web/documentserver-example/php/index.php
index cef87650..b538223e 100644
--- a/web/documentserver-example/php/index.php
+++ b/web/documentserver-example/php/index.php
@@ -29,6 +29,8 @@
require_once( dirname(__FILE__) . '/config.php' );
require_once( dirname(__FILE__) . '/common.php' );
require_once( dirname(__FILE__) . '/functions.php' );
+
+ $user = $_GET["user"];
?>
@@ -58,8 +60,6 @@
-
-