@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | /** |
64 | 64 | * Returns the raw signed request data. |
65 | 65 | * |
66 | - * @return string|null |
|
66 | + * @return string |
|
67 | 67 | */ |
68 | 68 | public function getRawSignedRequest() |
69 | 69 | { |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | * Returns a property from the signed request data if available. |
85 | 85 | * |
86 | 86 | * @param string $key |
87 | - * @param mixed|null $default |
|
87 | + * @param integer $default |
|
88 | 88 | * |
89 | 89 | * @return mixed|null |
90 | 90 | */ |
@@ -148,7 +148,7 @@ |
||
148 | 148 | * - language |
149 | 149 | * - courses : string of all courses code separated by '|' |
150 | 150 | * - admin : boolean |
151 | - * @return boolean |
|
151 | + * @return boolean|null |
|
152 | 152 | * @author ndiechburg <[email protected]> |
153 | 153 | * */ |
154 | 154 | function external_update_user($new_user) { |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | /** |
29 | 29 | * Establishes a connection to the LDAP server and sets the protocol version |
30 | 30 | * |
31 | - * @return resource ldap link identifier or false |
|
31 | + * @return boolean ldap link identifier or false |
|
32 | 32 | * @author ndiechburg <[email protected]> |
33 | 33 | * */ |
34 | 34 | function extldap_connect() |
@@ -77,6 +77,7 @@ discard block |
||
77 | 77 | /** |
78 | 78 | * Authenticate user on external ldap server and return user ldap entry if that succeeds |
79 | 79 | * |
80 | + * @param string $password |
|
80 | 81 | * @return mixed false if user cannot authenticate on ldap, user ldap entry if tha succeeds |
81 | 82 | * @author ndiechburg <[email protected]> |
82 | 83 | * Modified by [email protected] |
@@ -237,7 +238,7 @@ discard block |
||
237 | 238 | |
238 | 239 | /** |
239 | 240 | * Imports all LDAP users into Chamilo |
240 | - * @return bool false on error, true otherwise |
|
241 | + * @return false|null false on error, true otherwise |
|
241 | 242 | */ |
242 | 243 | function extldap_import_all_users() |
243 | 244 | { |
@@ -65,6 +65,7 @@ discard block |
||
65 | 65 | * If empty it disables authentication. |
66 | 66 | * |
67 | 67 | * !! 10 chars max !! |
68 | + * @param string $_ |
|
68 | 69 | */ |
69 | 70 | public static function enable_services($_) |
70 | 71 | { |
@@ -254,6 +255,9 @@ discard block |
||
254 | 255 | return Request::get('cidReq', 0); |
255 | 256 | } |
256 | 257 | |
258 | + /** |
|
259 | + * @return integer |
|
260 | + */ |
|
257 | 261 | public function get_group_id() |
258 | 262 | { |
259 | 263 | return Request::get('gidReq', 0); |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | require 'ldap_var.inc.php'; |
68 | 68 | /** |
69 | 69 | * Check login and password with LDAP |
70 | - * @return true when login & password both OK, false otherwise |
|
70 | + * @return boolean when login & password both OK, false otherwise |
|
71 | 71 | * @author Roan Embrechts (based on code from Universit� Jean Monet) |
72 | 72 | */ |
73 | 73 | |
@@ -305,7 +305,7 @@ discard block |
||
305 | 305 | } // end of check |
306 | 306 | /** |
307 | 307 | * Set the protocol version with version from config file (enables LDAP version 3) |
308 | - * @param resource The LDAP connexion resource, passed by reference. |
|
308 | + * @param resource resource LDAP connexion resource, passed by reference. |
|
309 | 309 | * @return void |
310 | 310 | */ |
311 | 311 | function ldap_set_version(&$resource) { |
@@ -323,6 +323,7 @@ discard block |
||
323 | 323 | * Handle bind (whether authenticated or not) |
324 | 324 | * @param resource The LDAP handler to which we are connecting (by reference) |
325 | 325 | * @param resource The LDAP bind handler we will be modifying |
326 | + * @param boolean $ldap_bind |
|
326 | 327 | * @return boolean Status of the bind assignment. True for success, false for failure. |
327 | 328 | */ |
328 | 329 | function ldap_handle_bind(&$ldap_handler,&$ldap_bind) { |
@@ -337,6 +337,7 @@ |
||
337 | 337 | |
338 | 338 | /** |
339 | 339 | * Make a HTTP request - This function has been copied straight over from Drupal 6 code (drupal_http_request) |
340 | + * @param string $data |
|
340 | 341 | */ |
341 | 342 | function openid_http_request($url, $headers = array(), $method = 'GET', $data = NULL, $retry = 3) { |
342 | 343 | $result = new stdClass(); |
@@ -121,6 +121,7 @@ discard block |
||
121 | 121 | |
122 | 122 | /** |
123 | 123 | * Encode a message from _openid_create_message for HTTP Post |
124 | + * @param null|string $message |
|
124 | 125 | */ |
125 | 126 | function _openid_encode_message($message) { |
126 | 127 | $encoded_message = ''; |
@@ -173,6 +174,7 @@ discard block |
||
173 | 174 | |
174 | 175 | /** |
175 | 176 | * Pull the href attribute out of an html link element. |
177 | + * @param string $rel |
|
176 | 178 | */ |
177 | 179 | function _openid_link_href($rel, $html) { |
178 | 180 | $rel = preg_quote($rel); |
@@ -186,6 +188,7 @@ discard block |
||
186 | 188 | |
187 | 189 | /** |
188 | 190 | * Pull the http-equiv attribute out of an html meta element |
191 | + * @param string $equiv |
|
189 | 192 | */ |
190 | 193 | function _openid_meta_httpequiv($equiv, $html) { |
191 | 194 | preg_match('|<meta\s+http-equiv=["\']' . $equiv . '["\'](.*)/?>|iU', $html, $matches); |
@@ -221,6 +224,10 @@ discard block |
||
221 | 224 | return base64_encode($signature); |
222 | 225 | } |
223 | 226 | |
227 | +/** |
|
228 | + * @param string $key |
|
229 | + * @param null|string $text |
|
230 | + */ |
|
224 | 231 | function _openid_hmac($key, $text) { |
225 | 232 | if (strlen($key) > OPENID_SHA1_BLOCKSIZE) { |
226 | 233 | $key = _openid_sha1($key, true); |
@@ -256,6 +263,9 @@ discard block |
||
256 | 263 | return base64_encode(_openid_dh_long_to_binary($str)); |
257 | 264 | } |
258 | 265 | |
266 | +/** |
|
267 | + * @param string $str |
|
268 | + */ |
|
259 | 269 | function _openid_dh_binary_to_long($str) { |
260 | 270 | $bytes = array_merge(unpack('C*', $str)); |
261 | 271 | |
@@ -297,6 +307,9 @@ discard block |
||
297 | 307 | return $string; |
298 | 308 | } |
299 | 309 | |
310 | +/** |
|
311 | + * @param string $secret |
|
312 | + */ |
|
300 | 313 | function _openid_dh_xorsecret($shared, $secret) { |
301 | 314 | $dh_shared_str = _openid_dh_long_to_binary($shared); |
302 | 315 | $sha1_dh_shared = _openid_sha1($dh_shared_str); |
@@ -308,6 +321,9 @@ discard block |
||
308 | 321 | return $xsecret; |
309 | 322 | } |
310 | 323 | |
324 | +/** |
|
325 | + * @param string $stop |
|
326 | + */ |
|
311 | 327 | function _openid_dh_rand($stop) { |
312 | 328 | static $duplicate_cache = array(); |
313 | 329 |
@@ -17,7 +17,7 @@ |
||
17 | 17 | |
18 | 18 | /** |
19 | 19 | * |
20 | - * @return ShibbolethData |
|
20 | + * @return ShibbolethStore |
|
21 | 21 | */ |
22 | 22 | public static function instance() |
23 | 23 | { |
@@ -56,6 +56,9 @@ |
||
56 | 56 | return $this->get(array('shibb_unique_id' => $id)); |
57 | 57 | } |
58 | 58 | |
59 | + /** |
|
60 | + * @param string $id |
|
61 | + */ |
|
59 | 62 | public function shibboleth_id_exists($id) |
60 | 63 | { |
61 | 64 | return $this->exist(array('shibb_unique_id' => $id)); |