Ignore:
Timestamp:
Aug 15, 2010, 2:55:57 AM (14 years ago)
Author:
Eric
Message:
  • Bug 1795 fixed: Fixes rules using email information and/or email of validation
  • Language files fixed
File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/NBC_UserAdvManager/trunk/include/functions.inc.php

    r6754 r6757  
    388388   
    389389    return get_absolute_root_url().UAM_PATH.'ConfirmMail.php?key='.$Confirm_Mail_ID;
     390  }
     391}
     392
     393
     394/* Function called from main.inc.php to set group to new users if manual validation is set */
     395function setgroup($user_id)
     396{
     397  global $conf;
     398 
     399  $conf_UAM = unserialize($conf['UserAdvManager']);
     400
     401  $query = "
     402DELETE FROM ".USER_GROUP_TABLE."
     403WHERE user_id = '".$user_id."'
     404  AND (
     405    group_id = '".$conf_UAM[2]."'
     406  OR
     407    group_id = '".$conf_UAM[3]."'
     408  )
     409;";
     410  pwg_query($query);
     411
     412  if (!is_admin() and $conf_UAM[8] <> -1)
     413  {
     414    $query = "
     415UPDATE ".USER_INFOS_TABLE."
     416SET status = '".$conf_UAM[8]."'
     417WHERE user_id = '".$user_id."'
     418;";
     419    pwg_query($query);
     420  }
     421
     422  if ( $conf_UAM[2] <> -1 )
     423  {
     424    $query = "
     425INSERT INTO ".USER_GROUP_TABLE."
     426  (user_id, group_id)
     427VALUES
     428  ('".$user_id."', '".$conf_UAM[2]."')
     429;";
     430    pwg_query($query);
    390431  }
    391432}
Note: See TracChangeset for help on using the changeset viewer.