/[drupal]/drupal/modules/openid/openid.api.php
ViewVC logotype

Contents of /drupal/modules/openid/openid.api.php

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.3 - (show annotations) (download) (as text)
Sun Sep 13 14:20:00 2009 UTC (2 months, 2 weeks ago) by dries
Branch: MAIN
CVS Tags: DRUPAL-7-0-UNSTABLE-10, DRUPAL-7-0-UNSTABLE-9, HEAD
Changes since 1.2: +16 -1 lines
File MIME type: text/x-php
- Patch #319840 by Aron Novak, darren.ferguson: added hook to the OpenID module for returning data when a user has logged in.
1 <?php
2 // $Id: openid.api.php,v 1.2 2009/05/24 17:39:33 dries Exp $
3
4 /**
5 * @file
6 * Hooks provided by the OpenID module.
7 */
8
9 /**
10 * @addtogroup hooks
11 * @{
12 */
13
14 /**
15 * Allow modules to modify the OpenID request parameters.
16 *
17 * @param $op
18 * The operation to be performed.
19 * Possible values:
20 * - request: Modify parameters before they are sent to the OpenID provider.
21 * @param $request
22 * An associative array of parameter defaults to which to modify or append.
23 * @return
24 * An associative array of parameters to be merged with the default list.
25 *
26 */
27 function hook_openid($op, $request) {
28 if ($op == 'request') {
29 $request['openid.identity'] = 'http://myname.myopenid.com/';
30 }
31 return $request;
32 }
33
34 /**
35 * Allow modules to act upon a successful OpenID login.
36 *
37 * @param $response
38 * Response values from the OpenID Provider.
39 * @param $account
40 * The Drupal user account that logged in
41 *
42 */
43 function hook_openid_response($response, $account) {
44 if (isset($response['openid.ns.ax'])) {
45 _mymodule_store_ax_fields($response, $account);
46 }
47 }
48
49 /**
50 * @} End of "addtogroup hooks".
51 */

  ViewVC Help
Powered by ViewVC 1.1.2