openid.php 466 B

1234567891011121314151617
  1. <?php
  2. $l=OC_L10N::get('settings');
  3. OC_JSON::checkLoggedIn();
  4. OCP\JSON::callCheck();
  5. OC_JSON::checkAppEnabled('user_openid');
  6. // Get data
  7. if( isset( $_POST['identity'] ) ) {
  8. $identity=$_POST['identity'];
  9. OC_Preferences::setValue(OC_User::getUser(), 'user_openid', 'identity', $identity);
  10. OC_JSON::success(array("data" => array( "message" => $l->t("OpenID Changed") )));
  11. }else{
  12. OC_JSON::error(array("data" => array( "message" => $l->t("Invalid request") )));
  13. }