summaryrefslogtreecommitdiffstats
path: root/settings/routes.php
diff options
context:
space:
mode:
authorkondou <kondou@ts.unde.re>2013-09-11 16:35:13 +0200
committerkondou <kondou@ts.unde.re>2013-09-11 16:35:13 +0200
commitf6faec0e0bfddb14cc17f4a7f60900438215dd35 (patch)
tree4acad7aefad759858f8316ebfdb06aabb01645d3 /settings/routes.php
parent4aa84047fe5c499c56b723006c8acaf5891c5df4 (diff)
downloadnextcloud-server-f6faec0e0bfddb14cc17f4a7f60900438215dd35.tar.gz
nextcloud-server-f6faec0e0bfddb14cc17f4a7f60900438215dd35.zip
Use a controller instead of two files for changepassword.php
Diffstat (limited to 'settings/routes.php')
-rw-r--r--settings/routes.php15
1 files changed, 10 insertions, 5 deletions
diff --git a/settings/routes.php b/settings/routes.php
index af1c70ea44d..71de81aa6c4 100644
--- a/settings/routes.php
+++ b/settings/routes.php
@@ -6,6 +6,9 @@
* See the COPYING-README file.
*/
+// Necessary to include changepassword controller
+OC::$CLASSPATH['OC\Settings\ChangePassword\Controller'] = 'settings/ajax/changepassword.php';
+
// Settings pages
$this->create('settings_help', '/settings/help')
->actionInclude('settings/help.php');
@@ -37,13 +40,15 @@ $this->create('settings_ajax_togglesubadmins', '/settings/ajax/togglesubadmins.p
->actionInclude('settings/ajax/togglesubadmins.php');
$this->create('settings_ajax_removegroup', '/settings/ajax/removegroup.php')
->actionInclude('settings/ajax/removegroup.php');
-$this->create('settings_ajax_changepassword', '/settings/ajax/changepassword.php')
- ->actionInclude('settings/ajax/changepassword.php');
-$this->create('settings_ajax_changepersonalpassword', '/settings/ajax/changepersonalpassword.php')
- ->actionInclude('settings/ajax/changepersonalpassword.php');
+$this->create('settings_ajax_changepassword', '/settings/users/changepassword')
+ ->post()
+ ->action('OC\Settings\ChangePassword\Controller', 'changeUserPassword');
$this->create('settings_ajax_changedisplayname', '/settings/ajax/changedisplayname.php')
->actionInclude('settings/ajax/changedisplayname.php');
-// personel
+// personal
+$this->create('settings_ajax_changepersonalpassword', '/settings/personal/changepassword')
+ ->post()
+ ->action('OC\Settings\ChangePassword\Controller', 'changePersonalPassword');
$this->create('settings_ajax_lostpassword', '/settings/ajax/lostpassword.php')
->actionInclude('settings/ajax/lostpassword.php');
$this->create('settings_ajax_setlanguage', '/settings/ajax/setlanguage.php')