Пример #1
0
         if ($r["success"] == "") {
             xerror($r["error"], "json");
         } else {
             xlogin($r["success"], "json");
         }
         // this will probably be the same
     }
 }
 $authinfo = checkAuth($username, $login, "json");
 if ($mode == "delete") {
     $updates = array();
     foreach ($json["devices"] as $link) {
         $updates[$i++] = $link["id"];
     }
     //insertLinks($updates, $developer, $authinfo["userid"], $authinfo["device"]);
     deleteAuth($updates, $authinfo["userid"], $username);
     xsuccess(count($updates) . " links updated", "json");
 } else {
     if ($mode == "history") {
         $result = readHistory($authinfo["userid"], "json");
         echo $result;
         die;
     } else {
         if ($mode == "devices") {
             $result = getDevices($authinfo["userid"], "json");
             echo $result;
             die;
         } else {
             if ($mode == "addauth") {
                 $device = $json["device"];
                 $r = addAuth($username, $authinfo["userid"], $device, $developer);
Пример #2
0
 protected function delete_id_authClass_handler()
 {
     deleteAuth($this->id, $this->authClass);
     header('Location: ' . filter_input(INPUT_SERVER, 'PHP_SELF'));
     return false;
 }
 public function action_deauth()
 {
     checkSession('get');
     require_once SUBSDIR . '/Extauth.subs.php';
     $provider = $_GET['provider'];
     $member = $_GET['member'];
     deleteAuth($member, $provider);
     redirectexit('action=profile;area=extauth');
 }