Address PHPStan warning in 'classes/pref/users.php'.

This commit is contained in:
wn_ 2021-11-14 20:27:17 +00:00
parent 5632d75a45
commit 6d438c5a77
1 changed files with 7 additions and 7 deletions

View File

@ -4,7 +4,7 @@ class Pref_Users extends Handler_Administrative {
return $method == "index";
}
function edit() {
function edit(): void {
$user = ORM::for_table('ttrss_users')
->select_expr("id,login,access_level,email,full_name,otp_enabled")
->find_one((int)$_REQUEST["id"])
@ -20,7 +20,7 @@ class Pref_Users extends Handler_Administrative {
}
}
function userdetails() {
function userdetails(): void {
$id = (int) clean($_REQUEST["id"]);
$sth = $this->pdo->prepare("SELECT login,
@ -103,7 +103,7 @@ class Pref_Users extends Handler_Administrative {
}
function editSave() {
function editSave(): void {
$id = (int)$_REQUEST['id'];
$password = clean($_REQUEST["password"]);
$user = ORM::for_table('ttrss_users')->find_one($id);
@ -132,7 +132,7 @@ class Pref_Users extends Handler_Administrative {
}
}
function remove() {
function remove(): void {
$ids = explode(",", clean($_REQUEST["ids"]));
foreach ($ids as $id) {
@ -149,7 +149,7 @@ class Pref_Users extends Handler_Administrative {
}
}
function add() {
function add(): void {
$login = clean($_REQUEST["login"]);
if (!$login) return; // no blank usernames
@ -178,11 +178,11 @@ class Pref_Users extends Handler_Administrative {
}
}
function resetPass() {
function resetPass(): void {
UserHelper::reset_password(clean($_REQUEST["id"]));
}
function index() {
function index(): void {
global $access_level_names;