/[drupal]/contributions/modules/qb/modules/qb_user/qb_user.module
ViewVC logotype

Diff of /contributions/modules/qb/modules/qb_user/qb_user.module

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

revision 1.1, Tue Feb 17 20:43:05 2009 UTC revision 1.2, Thu Feb 19 05:30:47 2009 UTC
# Line 1  Line 1 
1  <?php // $Id$  <?php // $Id: qb_user.module,v 1.1 2009/02/17 20:43:05 vauxia Exp $
2    
3  /**  /**
4   * Implementation of hook_menu().   * Implementation of hook_menu().
# Line 21  function qb_user_menu() { Line 21  function qb_user_menu() {
21   * Implementation of hook_user().   * Implementation of hook_user().
22   */   */
23  function qb_user_user($op, &$edit, &$account, $category = NULL) {  function qb_user_user($op, &$edit, &$account, $category = NULL) {
24      if (!$account->uid) return;
25    
26    // Process users based on the qb_user_enable setting.    // Process users based on the qb_user_enable setting.
27    switch($map = variable_get('qb_user_enable', 'none')) {    switch($map = variable_get('qb_user_enable', 'none')) {
# Line 40  function qb_user_user($op, &$edit, &$acc Line 41  function qb_user_user($op, &$edit, &$acc
41        // Add the user's data mappings, if available.        // Add the user's data mappings, if available.
42        $res = db_query("SELECT qdvid FROM {qb_user} WHERE uid = %d", $account->uid);        $res = db_query("SELECT qdvid FROM {qb_user} WHERE uid = %d", $account->uid);
43        while ($qdvid = db_result($res)) {        while ($qdvid = db_result($res)) {
44            $type = db_result(db_query("SELECT d.request FROM {qb_data_value} v
45              INNER JOIN {qb_data} d USING ( qdid ) WHERE v.qdvid = %d", $qdvid));
46          if (!isset($account->qb_user)) $account->qb_user = array();          if (!isset($account->qb_user)) $account->qb_user = array();
47          $account->qb_user[] = $qdid;          $account->qb_user[strtolower($type)] = $qdvid;
48        }        }
49        return;        return;
50    

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.2