PluginProbe
User Access Manager / 2.1.9
User Access Manager v2.1.9
2.3.20 2.3.19 2.3.18 2.3.17 2.3.16 2.3.15 2.3.14 2.3.13 trunk 0.6 0.6.1 0.6.2 0.7 0.7 Beta 0.7.0.1 0.8 0.8.0.1 0.8.0.2 0.9 0.9.1 0.9.1.1 0.9.1.2 0.9.1.3 0.9.1.4 1.0 All 136 releases
user-access-manager / src / Controller / Backend / UserObjectController.php

UserObjectController.php in User Access Manager 2.1.9, at src/Controller/Backend/UserObjectController.php

89 lines 2.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * UserObjectController.php
4 *
5 * The UserObjectController class file.
6 *
7 * PHP versions 5
8 *
9 * @author Alexander Schneider <alexanderschneider85@gmail.com>
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 */
15 namespace UserAccessManager\Controller\Backend;
16
17 use UserAccessManager\Object\ObjectHandler;
18
19 /**
20 * Class UserObjectController
21 *
22 * @package UserAccessManager\Controller\Backend
23 */
24 class UserObjectController extends ObjectController
25 {
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)
34 {
35 $defaults[self::COLUMN_NAME] = TXT_UAM_COLUMN_USER_GROUPS;
36 return $defaults;
37 }
38
39 /**
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
47 */
48 public function addUserColumn($return, $columnName, $id)
49 {
50 if ($columnName === self::COLUMN_NAME) {
51 $this->setObjectInformation(ObjectHandler::GENERAL_USER_OBJECT_TYPE, $id);
52 $return .= $this->getIncludeContents('UserColumn.php');
53 }
54
55 return $return;
56 }
57
58 /**
59 * The function for the edit_user_profile action.
60 */
61 public function showUserProfile()
62 {
63 $userId = $this->getRequestParameter('user_id');
64 $this->setObjectInformation(ObjectHandler::GENERAL_USER_OBJECT_TYPE, $userId);
65
66 echo $this->getIncludeContents('UserProfileEditForm.php');
67 }
68
69 /**
70 * The function for the profile_update action.
71 *
72 * @param integer $userId The user id.
73 */
74 public function saveUserData($userId)
75 {
76 $this->saveObjectData(ObjectHandler::GENERAL_USER_OBJECT_TYPE, $userId);
77 }
78
79 /**
80 * The function for the delete_user action.
81 *
82 * @param integer $userId The user id.
83 */
84 public function removeUserData($userId)
85 {
86 $this->removeObjectData(ObjectHandler::GENERAL_USER_OBJECT_TYPE, $userId);
87 }
88 }
89