summaryrefslogtreecommitdiffstats
path: root/pages/content/Users:Password.xml
blob: da7db38d04374a219f426832d072e57ef8cbce43 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?xml version="1.0" encoding="UTF-8" ?>
<page>
  <info>
    <name>Users:Password</name>
    <template>phpexec</template>
    <access>0:0</access>
    <type>c</type>
  </info>
  <data>
    <code>
      <![CDATA[
        <?PHP
          Uses('user', 'links', 'util');
          
          
          if($_POST['back']) {
            header('Location: ' . $GLOBALS['links']->GetNeonLink('Users', null, false));
            exit();
          }
          
          if(!$_POST['id'] || !$_POST['password'] || !$_POST['password2']) exit();
          
          if($_POST['password'] != $_POST['password2']) exit();
          
          $GLOBALS['user']->ChangePassword($_POST['id'], Unquote($_POST['password']));
          
          header('Location: ' . $GLOBALS['links']->GetNeonLink('Users', null, false));
          exit();
        ?>
      ]]>
    </code>
  </data>
</page>