summaryrefslogtreecommitdiffstats
path: root/pages/Users/Rename.c.xml
diff options
context:
space:
mode:
Diffstat (limited to 'pages/Users/Rename.c.xml')
-rw-r--r--pages/Users/Rename.c.xml33
1 files changed, 33 insertions, 0 deletions
diff --git a/pages/Users/Rename.c.xml b/pages/Users/Rename.c.xml
new file mode 100644
index 0000000..c076b10
--- /dev/null
+++ b/pages/Users/Rename.c.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<page>
+ <info>
+ <name>Users:Rename</name>
+ <template>phpexec</template>
+ <access>00</access>
+ <type>c</type>
+ </info>
+ <data>
+ <code>
+ <![CDATA[
+ <?PHP
+ require_once('code/user.inc.php');
+ require_once('code/links.inc.php');
+ require_once('code/util.inc.php');
+
+
+ if($_POST['back']) {
+ header('Location: ' . $GLOBALS['links']->GetNeonLink('Users', null, false));
+ exit();
+ }
+
+ if(!$_POST['id'] || !$_POST['name']) exit();
+
+ $GLOBALS['user']->Rename($_POST['id'], Unquote($_POST['name']));
+
+ header('Location: ' . $GLOBALS['links']->GetNeonLink('Users', null, false));
+ exit();
+ ?>
+ ]]>
+ </code>
+ </data>
+</page>