| @@ -1,16 +1,37 @@ | ||
| 1 | 1 | <?php |
| 2 | - | |
| 3 | -declare(strict_types=1); | |
| 4 | - | |
| 2 | +/** | |
| 3 | + * UserObjectController.php | |
| 4 | + * | |
| 5 | + * The UserObjectController class file. | |
| 6 | + * | |
| 7 | + * PHP versions 5 | |
| 8 | + * | |
| 9 | + * @author Alexander Schneider <[email protected]> | |
| 10 | + * @copyright 2008-2017 Alexander Schneider | |
| 11 | + * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 | |
| 12 | + * @version SVN: $id$ | |
| 13 | + * @link http://wordpress.org/extend/plugins/user-access-manager/ | |
| 14 | + */ | |
| 5 | 15 | namespace UserAccessManager\Controller\Backend; |
| 6 | 16 | |
| 7 | 17 | use UserAccessManager\Object\ObjectHandler; |
| 8 | -use UserAccessManager\UserGroup\UserGroupTypeException; | |
| 9 | 18 | |
| 19 | +/** | |
| 20 | + * Class UserObjectController | |
| 21 | + * | |
| 22 | + * @package UserAccessManager\Controller\Backend | |
| 23 | + */ | |
| 10 | 24 | class UserObjectController extends ObjectController |
| 11 | 25 | { |
| 12 | - public function addUserColumnsHeader(array $defaults): array | |
| 26 | + /** | |
| 27 | + * The function for the manage_users_columns filter. | |
| 28 | + * | |
| 29 | + * @param array $defaults The table headers. | |
| 30 | + * | |
| 31 | + * @return array | |
| 32 | + */ | |
| 33 | + public function addUserColumnsHeader($defaults) | |
| 13 | 34 | { |
| 14 | 35 | $defaults[self::COLUMN_NAME] = TXT_UAM_COLUMN_USER_GROUPS; |
| 15 | 36 | return $defaults; |
| 16 | 37 | } |
| @@ -15,11 +36,17 @@ | ||
| 15 | 36 | return $defaults; |
| 16 | 37 | } |
| 17 | 38 | |
| 18 | 39 | /** |
| 19 | - * @throws UserGroupTypeException | |
| 40 | + * The function for the manage_users_custom_column action. | |
| 41 | + * | |
| 42 | + * @param string $return The normal return value. | |
| 43 | + * @param string $columnName The column name. | |
| 44 | + * @param integer $id The id. | |
| 45 | + * | |
| 46 | + * @return string|null | |
| 20 | 47 | */ |
| 21 | - public function addUserColumn(?string $return, string $columnName, int|string|null $id): ?string | |
| 48 | + public function addUserColumn($return, $columnName, $id) | |
| 22 | 49 | { |
| 23 | 50 | if ($columnName === self::COLUMN_NAME) { |
| 24 | 51 | $this->setObjectInformation(ObjectHandler::GENERAL_USER_OBJECT_TYPE, $id); |
| 25 | 52 | $return .= $this->getIncludeContents('UserColumn.php'); |
| @@ -28,11 +55,11 @@ | ||
| 28 | 55 | return $return; |
| 29 | 56 | } |
| 30 | 57 | |
| 31 | 58 | /** |
| 32 | - * @throws UserGroupTypeException | |
| 59 | + * The function for the edit_user_profile action. | |
| 33 | 60 | */ |
| 34 | - public function showUserProfile(): void | |
| 61 | + public function showUserProfile() | |
| 35 | 62 | { |
| 36 | 63 | $userId = $this->getRequestParameter('user_id'); |
| 37 | 64 | $this->setObjectInformation(ObjectHandler::GENERAL_USER_OBJECT_TYPE, $userId); |
| 38 | 65 | |
| @@ -39,16 +66,23 @@ | ||
| 39 | 66 | echo $this->getIncludeContents('UserProfileEditForm.php'); |
| 40 | 67 | } |
| 41 | 68 | |
| 42 | 69 | /** |
| 43 | - * @throws UserGroupTypeException | |
| 70 | + * The function for the profile_update action. | |
| 71 | + * | |
| 72 | + * @param integer $userId The user id. | |
| 44 | 73 | */ |
| 45 | - public function saveUserData(int|string|null $userId): void | |
| 74 | + public function saveUserData($userId) | |
| 46 | 75 | { |
| 47 | 76 | $this->saveObjectData(ObjectHandler::GENERAL_USER_OBJECT_TYPE, $userId); |
| 48 | 77 | } |
| 49 | 78 | |
| 50 | - public function removeUserData(int|string|null $userId): void | |
| 79 | + /** | |
| 80 | + * The function for the delete_user action. | |
| 81 | + * | |
| 82 | + * @param integer $userId The user id. | |
| 83 | + */ | |
| 84 | + public function removeUserData($userId) | |
| 51 | 85 | { |
| 52 | 86 | $this->removeObjectData(ObjectHandler::GENERAL_USER_OBJECT_TYPE, $userId); |
| 53 | 87 | } |
| 54 | 88 | } |