summaryrefslogtreecommitdiffstats
path: root/settings/ajax
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2011-09-26 21:10:56 +0200
committerBart Visscher <bartv@thisnet.nl>2011-09-26 21:17:26 +0200
commitf14930389505eda61ec4cbcdf59a54e63513802b (patch)
treed7ed274e9e95963682b13760b857e6575911b901 /settings/ajax
parent950d4e1da498b7c928b5f6e1cbcca8e57ddecb0c (diff)
downloadnextcloud-server-f14930389505eda61ec4cbcdf59a54e63513802b.tar.gz
nextcloud-server-f14930389505eda61ec4cbcdf59a54e63513802b.zip
Add email field to personal preferences
Diffstat (limited to 'settings/ajax')
-rw-r--r--settings/ajax/lostpassword.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/settings/ajax/lostpassword.php b/settings/ajax/lostpassword.php
new file mode 100644
index 00000000000..a2dfc033206
--- /dev/null
+++ b/settings/ajax/lostpassword.php
@@ -0,0 +1,19 @@
+<?php
+
+// Init owncloud
+require_once('../../lib/base.php');
+
+OC_JSON::checkLoggedIn();
+
+$l=new OC_L10N('core');
+
+// Get data
+if( isset( $_POST['email'] ) ){
+ $email=trim($_POST['email']);
+ OC_Preferences::setValue(OC_User::getUser(),'settings','email',$email);
+ OC_JSON::success(array("data" => array( "message" => $l->t("email Changed") )));
+}else{
+ OC_JSON::error(array("data" => array( "message" => $l->t("Invalid request") )));
+}
+
+?>