]> 91.132.146.200 Git - bibliotheca-php.git/commitdiff
error in profile
authorBanana <mail@bananas-playground.net>
Sun, 18 Apr 2021 18:37:28 +0000 (20:37 +0200)
committerBanana <mail@bananas-playground.net>
Sun, 18 Apr 2021 18:37:28 +0000 (20:37 +0200)
webclient/lib/possessed.class.php
webclient/view/default/profile/profile.php

index 996279be862bcc43edf934764eec390ebdce6b01..f1856544e7eae148ecd305a967ec757d4f25a97f 100644 (file)
@@ -2,7 +2,7 @@
 /**
  * Bibliotheca
  *
- * Copyright 2018-2020 Johannes Keßler
+ * Copyright 2018-2021 Johannes Keßler
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -45,7 +45,7 @@ class Possessed {
         * @param mysqli $databaseConnectionObject
         * @param Doomguy $userObj
         */
-       public function __construct($databaseConnectionObject, $userObj) {
+       public function __construct(mysqli $databaseConnectionObject, Doomguy $userObj) {
                $this->_DB = $databaseConnectionObject;
                $this->_User = $userObj;
        }
@@ -83,7 +83,7 @@ class Possessed {
         *
         * @return array
         */
-       public function getUsers() {
+       public function getUsers(): array {
                $ret = array();
 
                $queryStr = "SELECT `id`, `login`, `name`, `active`, `baseGroupId`, `protected`, `created`
@@ -117,7 +117,7 @@ class Possessed {
         * @param bool $active
         * @return bool
         */
-       public function createUser($username, $login, $password, $group, $groups, $active=false) {
+       public function createUser(string $username, string $login, string $password, string $group, array $groups, $active=false): bool {
                $ret = false;
 
                if($this->_validNewLogin($login) && $this->_validUsergroup($group)) {
@@ -190,7 +190,7 @@ class Possessed {
         * @param bool $refreshApiToken
         * @return bool
         */
-       public function updateUser($id, $username, $login, $password, $group, $groups, $active=false, $refreshApiToken=false) {
+       public function updateUser(string $id, string $username, string $login, string $password, string $group, array $groups, $active=false, $refreshApiToken=false): bool {
                $ret = false;
 
                if($this->_validUpdateLogin($login,$id) && $this->_validUsergroup($group)) {
index 2deb759e39dcb8b385fe90e7fa9dcbc50a32a09c..bd16c8625a458b27270dba8268769d72ac325a0b 100644 (file)
@@ -32,7 +32,7 @@ if(!empty($TemplateData['editData'])) {
                                $refreshApi = true;
                        }
                        $do = $Possessed->updateUser($Doomguy->param('id'), $_username, $Doomguy->param('login'),
-                                                                                       $_password, $Doomguy->param('baseGroupId'), true, $refreshApi);
+                                                                                       $_password, $Doomguy->param('baseGroupId'), array(), true, $refreshApi);
                        if ($do === true) {
                                $TemplateData['refresh'] = 'index.php?p=profile';
                        } else {