1 | <?php |
||
47 | class User { |
||
48 | |||
49 | /** |
||
50 | * Get a list of all users |
||
51 | * @param string $search search pattern |
||
52 | * @param int|null $limit |
||
53 | * @param int|null $offset |
||
54 | * @return array an array of all uids |
||
55 | * @deprecated 8.1.0 use method search() of \OCP\IUserManager - \OC::$server->getUserManager() |
||
56 | * @since 5.0.0 |
||
57 | */ |
||
58 | public static function getUsers($search = '', $limit = null, $offset = null) { |
||
61 | |||
62 | /** |
||
63 | * Get the user display name of the user currently logged in. |
||
64 | * @param string|null $user user id or null for current user |
||
65 | * @return string display name |
||
66 | * @deprecated 8.1.0 fetch \OCP\IUser (has getDisplayName()) by using method |
||
67 | * get() of \OCP\IUserManager - \OC::$server->getUserManager() |
||
68 | * @since 5.0.0 |
||
69 | */ |
||
70 | public static function getDisplayName($user = null) { |
||
73 | |||
74 | /** |
||
75 | * Get a list of all display names and user ids. |
||
76 | * @param string $search search pattern |
||
77 | * @param int|null $limit |
||
78 | * @param int|null $offset |
||
79 | * @return array an array of all display names (value) and the correspondig uids (key) |
||
80 | * @deprecated 8.1.0 use method searchDisplayName() of \OCP\IUserManager - \OC::$server->getUserManager() |
||
81 | * @since 5.0.0 |
||
82 | */ |
||
83 | public static function getDisplayNames($search = '', $limit = null, $offset = null) { |
||
86 | |||
87 | /** |
||
88 | * Check if the user is logged in |
||
89 | * @return boolean |
||
90 | * @since 5.0.0 |
||
91 | */ |
||
92 | public static function isLoggedIn() { |
||
95 | |||
96 | /** |
||
97 | * Check if a user exists |
||
98 | * @param string $uid the username |
||
99 | * @param string $excludingBackend (default none) |
||
100 | * @return boolean |
||
101 | * @deprecated 8.1.0 use method userExists() of \OCP\IUserManager - \OC::$server->getUserManager() |
||
102 | * @since 5.0.0 |
||
103 | */ |
||
104 | public static function userExists($uid, $excludingBackend = null) { |
||
107 | /** |
||
108 | * Logs the user out including all the session data |
||
109 | * Logout, destroys session |
||
110 | * @deprecated 8.0.0 Use \OC::$server->getUserSession()->logout(); |
||
111 | * @since 5.0.0 |
||
112 | */ |
||
113 | public static function logout() { |
||
116 | |||
117 | /** |
||
118 | * Check if the password is correct |
||
119 | * @param string $uid The username |
||
120 | * @param string $password The password |
||
121 | * @return string|false username on success, false otherwise |
||
122 | * |
||
123 | * Check if the password is correct without logging in the user |
||
124 | * @deprecated 8.0.0 Use \OC::$server->getUserManager()->checkPassword(); |
||
125 | * @since 5.0.0 |
||
126 | */ |
||
127 | public static function checkPassword($uid, $password) { |
||
130 | |||
131 | /** |
||
132 | * Check if the user is a admin, redirects to home if not |
||
133 | * @since 5.0.0 |
||
134 | */ |
||
135 | public static function checkAdminUser() { |
||
138 | |||
139 | /** |
||
140 | * Check if the user is logged in, redirects to home if not. With |
||
141 | * redirect URL parameter to the request URI. |
||
142 | * @since 5.0.0 |
||
143 | */ |
||
144 | public static function checkLoggedIn() { |
||
147 | } |
||
148 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.