35 行
832 B
PHP
35 行
832 B
PHP
|
<?php
|
||
|
|
||
|
namespace App\Http\Controllers\Peertube\Admin;
|
||
|
use Illuminate\Support\Facades\DB;
|
||
|
use Illuminate\Http\Request;
|
||
|
use App\Http\Controllers\Peertube\Common;
|
||
|
// use Illuminate\Support\Facades\Log;
|
||
|
|
||
|
class Users extends Common {
|
||
|
private $common;
|
||
|
|
||
|
public function __construct () {
|
||
|
$this->common = new Common;
|
||
|
}
|
||
|
|
||
|
public function index () {
|
||
|
if (!isset($this->common->user->me) || is_null($this->common->user->me)) {
|
||
|
if ($this->common->user->me->adminFlags != 1) {
|
||
|
return redirect('/peertube/videos/local');
|
||
|
}
|
||
|
}
|
||
|
|
||
|
$res = [
|
||
|
'page' => 'dummy',
|
||
|
'userinfo' => $this->common->user,
|
||
|
];
|
||
|
// $res['owner'] = $this->getOwner($id);
|
||
|
return view('pages.peertube.notyet', ['res' => $res]);
|
||
|
}
|
||
|
|
||
|
function getOwner ($id) {
|
||
|
return $this->ptapi_get('/api/v1/accounts/'.$id);
|
||
|
}
|
||
|
}
|