mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 13:54:02 -07:00
Перенос файлов движка в корень
This commit is contained in:
parent
584f692288
commit
f94c0dd2ee
585 changed files with 14 additions and 14 deletions
25
library/ajax/gen_passkey.php
Normal file
25
library/ajax/gen_passkey.php
Normal file
|
@ -0,0 +1,25 @@
|
|||
<?php
|
||||
|
||||
if (!defined('IN_AJAX')) die(basename(__FILE__));
|
||||
|
||||
global $userdata, $lang;
|
||||
|
||||
$req_uid = (int) $this->request['user_id'];
|
||||
|
||||
if ($req_uid == $userdata['user_id'] || IS_ADMIN)
|
||||
{
|
||||
if (empty($this->request['confirmed']))
|
||||
{
|
||||
$this->prompt_for_confirm($lang['BT_GEN_PASSKEY_NEW']);
|
||||
}
|
||||
|
||||
if (!$passkey = generate_passkey($req_uid, IS_ADMIN))
|
||||
{
|
||||
$this->ajax_die('Could not insert passkey');
|
||||
}
|
||||
|
||||
tracker_rm_user($req_uid);
|
||||
|
||||
$this->response['passkey'] = $passkey;
|
||||
}
|
||||
else $this->ajax_die($lang['NOT_AUTHORISED']);
|
Loading…
Add table
Add a link
Reference in a new issue