Blame view

sources/apps/user_openid_provider/ajax/remove.php 538 Bytes
42e4f8d60   Kload   add all apps
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
  <?php
  /**
   * Copyright (c) 2012 Bart Visscher <bartv@thisnet.nl>
   * This file is licensed under the Affero General Public License version 3 or
   * later.
   * See the COPYING-README file.
   */
  
  // Check if we are a user
  OCP\JSON::checkLoggedIn();
  OCP\JSON::checkAppEnabled('user_openid_provider');
  OCP\JSON::callCheck();
  set_include_path(get_include_path().PATH_SEPARATOR.__DIR__.'/../3rdparty');
  
  $url = $_POST['url'];
  
  $storage = new OC_OpenIdProviderStorage();
  $storage->addSite('/?'.OCP\User::getUser(), $url, null);
  OCP\JSON::success();