Changeset 6787


Ignore:
Timestamp:
Aug 21, 2010, 10:51:00 PM (10 years ago)
Author:
Eric
Message:

Merge from Trunk to Branch 2.15

Location:
extensions/NBC_UserAdvManager/branches/2.15
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • extensions/NBC_UserAdvManager/branches/2.15/ConfirmMail.php

    r6776 r6787  
    88include_once (UAM_PATH.'include/functions.inc.php');
    99
    10 // +-----------------------------------------------------------------------+
    11 // | Check Access and exit when user status is not ok                      |
    12 // +-----------------------------------------------------------------------+
    13 //check_status(ACCESS_NONE);
    14 load_language('plugin.lang', UAM_PATH);
    15 
    1610$title= l10n('confirm_mail_page_title');
    1711$page['body_id'] = 'theAboutPage';
     
    2216
    2317
    24 if (isset($_GET['key']))
     18if (isset($_GET['key']) and isset($_GET['userid']))
    2519{
    2620
    27   global $conf;
     21  global $user, $lang, $conf, $errors;
     22 
     23  $key = $_GET['key'];
     24  $userid = $_GET['userid'];
     25  $redirect = false;
    2826 
    2927  $conf_UAM_ConfirmMail = unserialize($conf['UserAdvManager_ConfirmMail']);
     28  $conf_UAM = unserialize($conf['UserAdvManager']);
    3029
    31   if (VerifyConfirmMail($_GET['key']))
     30  if (VerifyConfirmMail($key))
    3231  {
    3332    $status = true;
    3433   
     34    log_user($userid, false);
     35
     36/* We have to get the user's language in database */
     37    $query = '
     38SELECT '.USER_INFOS_TABLE.'.language
     39FROM '.USER_INFOS_TABLE.','.USER_CONFIRM_MAIL_TABLE.'
     40WHERE (('.USER_INFOS_TABLE.'.user_id ='.$userid.') AND ('.USER_INFOS_TABLE.'.user_id = '.USER_CONFIRM_MAIL_TABLE.'.user_id))
     41;';
     42    $data = pwg_db_fetch_assoc(pwg_query($query));
     43
     44/* Check if user is already registered (profile changing) - If not (new registration), language is set to current gallery language */
     45    if (empty($data))
     46    {
     47/* And switch gallery to this language before using personalized and multilangual contents */
     48      $language = pwg_get_session_var('lang_switch', $user['language']);
     49      switch_lang_to($language);
     50    }
     51    else
     52    {
     53/* And switch gallery to this language before using personalized and multilangual contents */
     54      switch_lang_to($data['language']);
     55      load_language('plugin.lang', UAM_PATH);
     56    }
     57
     58    if (function_exists('get_user_language_desc'))
     59    {
     60      $custom_text = get_user_language_desc($conf_UAM_ConfirmMail[5]);
     61    }
     62    else $custom_text = l10n($conf_UAM_ConfirmMail[5]);
     63
     64    if (isset($conf_UAM[21]) and $conf_UAM[21] == 'true')
     65    {
     66      $user_idsOK = array();
     67      if (!check_consult($userid, $user_idsOK))
     68      {
     69        $redirect = true;
     70      }
     71    }
     72   
    3573    $template->assign(
    3674                        array(
     75        'REDIRECT'             => $redirect,
    3776        'STATUS'               => $status,
    38                                 'CONFIRM_MAIL_MESSAGE' => $conf_UAM_ConfirmMail[5],
     77                                'CONFIRM_MAIL_MESSAGE' => $custom_text,
    3978                        )
    4079                );
     
    4382  {
    4483    $status = false;
     84    if (function_exists('get_user_language_desc'))
     85    {
     86      $custom_text = get_user_language_desc($conf_UAM_ConfirmMail[6]);
     87    }
     88    else $custom_text = l10n($conf_UAM_ConfirmMail[6]);
     89   
    4590    $template->assign(
    4691                        array(
     92        'REDIRECT'             => $redirect,
    4793        'STATUS'               => $status,
    48                                 'CONFIRM_MAIL_MESSAGE' => $conf_UAM_ConfirmMail[6],
     94                                'CONFIRM_MAIL_MESSAGE' => $custom_text,
    4995                        )
    5096                );
     
    60106
    61107if ( isset($conf['gallery_url']) )
    62         {
     108{
    63109        $template->assign(
    64110                array(
  • extensions/NBC_UserAdvManager/branches/2.15/admin/UAM_admin.php

    r6776 r6787  
    370370                  while($row = pwg_db_fetch_assoc($result))
    371371                {
    372                                 $msg_error1 .= (($msg_error1 <> '') ? '<br/>' : '') . l10n('Err_audit_no_casse').stripslashes($row['username']);
     372                                $msg_error1 .= (($msg_error1 <> '') ? '<br>' : '') . l10n('Err_audit_no_casse').stripslashes($row['username']);
    373373                        }
    374374                }
     
    389389                        {
    390390                                if (!ValidateUsername(stripslashes($row['username'])))
    391                                         $msg_error2 .= (($msg_error2 <> '') ? '<br/>' : '') . l10n('Err_audit_username_char').stripslashes($row['username']);
     391                                        $msg_error2 .= (($msg_error2 <> '') ? '<br>' : '') . l10n('Err_audit_username_char').stripslashes($row['username']);
    392392                        }
    393393                }
     
    413413                                  if (preg_match($pattern, $row['mail_address']))
    414414                                  {
    415                                                 $msg_error3 .=  (($msg_error3 <> '') ? '<br/>' : '') . l10n('Err_audit_email_forbidden').stripslashes($row['username']).' ('.$row['mail_address'].')';
     415                                                $msg_error3 .=  (($msg_error3 <> '') ? '<br>' : '') . l10n('Err_audit_email_forbidden').stripslashes($row['username']).' ('.$row['mail_address'].')';
    416416                                        }
    417417                                }
     
    420420               
    421421    if ($msg_error1 <> '')
    422                         $errors[] = $msg_error1.'<br/><br/>';
     422                        $errors[] = $msg_error1.'<br><br>';
    423423               
    424424                if ($msg_error2 <> '')
    425                         $errors[] = $msg_error2.'<br/><br/>';
     425                        $errors[] = $msg_error2.'<br><br>';
    426426               
    427427                if ($msg_error3 <> '')
    428                 $errors[] = $msg_error3.'<br/><br/>';
     428                $errors[] = $msg_error3.'<br><br>';
    429429               
    430430                if ($msg_error1 <> '' or $msg_error2 <> '' or $msg_error3 <> '')
  • extensions/NBC_UserAdvManager/branches/2.15/admin/template/ghosttracker.tpl

    r6776 r6787  
    1919    {ldelim}
    2020      $("#sorting")
    21       .tablesorter({ldelim}sortList:[[3,1]], headers: {ldelim} 0: {ldelim} sorter: false {rdelim}{rdelim}{rdelim})
     21      .tablesorter({ldelim}sortList:[[4,1]], headers: {ldelim} 0: {ldelim} sorter: false {rdelim}{rdelim}{rdelim})
    2222      .tablesorterPager({ldelim}container: $("#pager"), positionFixed: false, size: 20, totalPages: 0{rdelim});
    2323    {rdelim}
     
    4747              <th>&nbsp;</th>
    4848              <th>{'Username'|@translate}</th>
     49              <th>{'Profile'|@translate}</th>
    4950              <th>{'Email address'|@translate}</th>
    5051              <th>{'LastVisit_Date'|@translate}</th>
     
    5758              <td><input type="checkbox" name="selection[]" value="{$user.ID}" {$user.CHECKED} id="selection-{$user.ID}" ></td>
    5859              <td><label for="selection-{$user.ID}">{$user.USERNAME}</label></td>
     60              <td style="text-align:center;"><a href="./admin.php?page=profile&amp;user_id={$user.ID}" title="{'Profile'|@translate}" onclick="window.open(this.href); return false;"><img src="{$UAM_PATH}admin/template/icon/edit_s.png"></a></td>
    5961              <td>{$user.EMAIL}</td>
    6062{if $user.REMINDER == l10n('Reminder_Sent_NOK')}
  • extensions/NBC_UserAdvManager/branches/2.15/admin/template/global.tpl

    r6776 r6787  
    132132            {if $UAM_ERROR_REPORTS4}     
    133133              <div id="uam_leftmargin">
    134                 <textarea name="UAM_MailExclusion_List" id="UAM_MailExclusion_List" rows="3" cols="80" style="color: red" {$TAG_INPUT_ENABLED}>{$UAM_MAILEXCLUSION_LIST}</textarea>
     134                <textarea class="uam_textfields" name="UAM_MailExclusion_List" id="UAM_MailExclusion_List" rows="3" style="color: red" {$TAG_INPUT_ENABLED}>{$UAM_MAILEXCLUSION_LIST}</textarea>
    135135              </div>
    136136            <br><br>
    137137            {else}
    138138              <div id="uam_leftmargin">
    139                 <textarea name="UAM_MailExclusion_List" id="UAM_MailExclusion_List" rows="3" cols="80" {$TAG_INPUT_ENABLED}>{$UAM_MAILEXCLUSION_LIST}</textarea>
     139                <textarea class="uam_textfields" name="UAM_MailExclusion_List" id="UAM_MailExclusion_List" rows="3" {$TAG_INPUT_ENABLED}>{$UAM_MAILEXCLUSION_LIST}</textarea>
    140140              </div>
    141141            <br><br>
     
    143143          {else}
    144144            <div id="uam_leftmargin">
    145               <textarea name="UAM_MailExclusion_List" id="UAM_MailExclusion_List" rows="3" cols="80" readonly {$TAG_INPUT_ENABLED}>{$UAM_MAILEXCLUSION_LIST}</textarea>
     145              <textarea class="uam_textfields" name="UAM_MailExclusion_List" id="UAM_MailExclusion_List" rows="3" readonly {$TAG_INPUT_ENABLED}>{$UAM_MAILEXCLUSION_LIST}</textarea>
    146146            </div>
    147147          <br><br>
     
    185185                </label>
    186186              <br><br>
    187                 <textarea name="UAM_MailInfo_Text" id="UAM_MailInfo_Text" rows="10" cols="80" {$TAG_INPUT_ENABLED}>{$UAM_MAILINFO_TEXT}</textarea>
     187                <textarea class="uam_textfields" name="UAM_MailInfo_Text" id="UAM_MailInfo_Text" rows="10" {$TAG_INPUT_ENABLED}>{$UAM_MAILINFO_TEXT}</textarea>
    188188              <br><br>
    189189              </li>
     
    194194                </label>
    195195              <br><br>
    196                 <textarea name="UAM_MailInfo_Text" id="UAM_MailInfo_Text" rows="10" cols="80" readonly {$TAG_INPUT_ENABLED}>{$UAM_MAILINFO_TEXT}</textarea>
     196                <textarea class="uam_textfields" name="UAM_MailInfo_Text" id="UAM_MailInfo_Text" rows="10" readonly {$TAG_INPUT_ENABLED}>{$UAM_MAILINFO_TEXT}</textarea>
    197197              <br><br>
    198198              </li>
     
    240240                </label>
    241241              <br><br>
    242                 <textarea name="UAM_ConfirmMail_Text" id="UAM_ConfirmMail_Text" rows="10" cols="80" {$TAG_INPUT_ENABLED}>{$UAM_CONFIRMMAIL_TEXT}</textarea>
     242                <textarea class="uam_textfields" name="UAM_ConfirmMail_Text" id="UAM_ConfirmMail_Text" rows="10" {$TAG_INPUT_ENABLED}>{$UAM_CONFIRMMAIL_TEXT}</textarea>
    243243              <br><br>
    244244              </li>
     
    249249                </label>
    250250              <br><br>
    251                 <textarea name="UAM_ConfirmMail_Text" id="UAM_ConfirmMail_Text" rows="10" cols="80" readonly {$TAG_INPUT_ENABLED}>{$UAM_CONFIRMMAIL_TEXT}</textarea>
     251                <textarea class="uam_textfields" name="UAM_ConfirmMail_Text" id="UAM_ConfirmMail_Text" rows="10" readonly {$TAG_INPUT_ENABLED}>{$UAM_CONFIRMMAIL_TEXT}</textarea>
    252252              <br><br>
    253253              </li>
     
    266266                </label>
    267267              <br><br>
    268                 <textarea name="UAM_ConfirmMail_Custom_Txt1" id="UAM_ConfirmMail_Custom_Txt1" rows="10" cols="80" {$TAG_INPUT_ENABLED}>{$UAM_CONFIRMMAIL_CUSTOM_TXT1}</textarea>
     268                <textarea class="uam_textfields" name="UAM_ConfirmMail_Custom_Txt1" id="UAM_ConfirmMail_Custom_Txt1" rows="10" {$TAG_INPUT_ENABLED}>{$UAM_CONFIRMMAIL_CUSTOM_TXT1}</textarea>
    269269              <br><br>
    270270              </li>
     
    280280                </label>
    281281              <br><br>
    282                 <textarea name="UAM_ConfirmMail_Custom_Txt2" id="UAM_ConfirmMail_Custom_Txt2" rows="10" cols="80" {$TAG_INPUT_ENABLED}>{$UAM_CONFIRMMAIL_CUSTOM_TXT2}</textarea>
     282                <textarea class="uam_textfields" name="UAM_ConfirmMail_Custom_Txt2" id="UAM_ConfirmMail_Custom_Txt2" rows="10" {$TAG_INPUT_ENABLED}>{$UAM_CONFIRMMAIL_CUSTOM_TXT2}</textarea>
    283283              <br><br>
    284284              </li>
     
    294294                </label>
    295295              <br><br>
    296                 <textarea name="UAM_ConfirmMail_Custom_Txt1" id="UAM_ConfirmMail_Custom_Txt1" rows="10" cols="80" readonly {$TAG_INPUT_ENABLED}>{$UAM_CONFIRMMAIL_CUSTOM_TXT1}</textarea>
     296                <textarea class="uam_textfields" name="UAM_ConfirmMail_Custom_Txt1" id="UAM_ConfirmMail_Custom_Txt1" rows="10" readonly {$TAG_INPUT_ENABLED}>{$UAM_CONFIRMMAIL_CUSTOM_TXT1}</textarea>
    297297              <br><br>
    298298              </li>
     
    303303                </label>
    304304              <br><br>
    305                 <textarea name="UAM_ConfirmMail_Custom_Txt2" id="UAM_ConfirmMail_Custom_Txt2" rows="10" cols="80" readonly {$TAG_INPUT_ENABLED}>{$UAM_CONFIRMMAIL_CUSTOM_TXT2}</textarea>
     305                <textarea class="uam_textfields" name="UAM_ConfirmMail_Custom_Txt2" id="UAM_ConfirmMail_Custom_Txt2" rows="10" readonly {$TAG_INPUT_ENABLED}>{$UAM_CONFIRMMAIL_CUSTOM_TXT2}</textarea>
    306306              <br><br>
    307307              </li>
     
    403403                  </label>
    404404                <br><br>
    405                   <textarea name="UAM_ConfirmMail_ReMail_Txt1" id="UAM_ConfirmMail_ReMail_Txt1" rows="10" cols="80" {$TAG_INPUT_ENABLED}>{$UAM_CONFIRMMAIL_REMAIL_TXT1}</textarea>
     405                  <textarea class="uam_textfields" name="UAM_ConfirmMail_ReMail_Txt1" id="UAM_ConfirmMail_ReMail_Txt1" rows="10" {$TAG_INPUT_ENABLED}>{$UAM_CONFIRMMAIL_REMAIL_TXT1}</textarea>
    406406                <br><br>
    407407                </li>
     
    412412                  </label>
    413413                <br><br>
    414                   <textarea  name="UAM_ConfirmMail_ReMail_Txt1" id="UAM_ConfirmMail_ReMail_Txt1" rows="10" cols="80" readonly{$TAG_INPUT_ENABLED}>{$UAM_CONFIRMMAIL_REMAIL_TXT1}</textarea>
     414                  <textarea class="uam_textfields" name="UAM_ConfirmMail_ReMail_Txt1" id="UAM_ConfirmMail_ReMail_Txt1" rows="10" readonly{$TAG_INPUT_ENABLED}>{$UAM_CONFIRMMAIL_REMAIL_TXT1}</textarea>
    415415                <br><br>
    416416                </li>
     
    430430                  </label>
    431431                <br><br>
    432                   <textarea name="UAM_ConfirmMail_ReMail_Txt2" id="UAM_ConfirmMail_ReMail_Txt2" rows="10" cols="80" {$TAG_INPUT_ENABLED}>{$UAM_CONFIRMMAIL_REMAIL_TXT2}</textarea><br>
     432                  <textarea class="uam_textfields" name="UAM_ConfirmMail_ReMail_Txt2" id="UAM_ConfirmMail_ReMail_Txt2" rows="10" {$TAG_INPUT_ENABLED}>{$UAM_CONFIRMMAIL_REMAIL_TXT2}</textarea><br>
    433433                </li>
    434434              {else}
     
    438438                  </label>
    439439                <br><br>
    440                   <textarea name="UAM_ConfirmMail_ReMail_Txt2" id="UAM_ConfirmMail_ReMail_Txt2" rows="10" cols="80" readonly {$TAG_INPUT_ENABLED}>{$UAM_CONFIRMMAIL_REMAIL_TXT2}</textarea>
     440                  <textarea class="uam_textfields" name="UAM_ConfirmMail_ReMail_Txt2" id="UAM_ConfirmMail_ReMail_Txt2" rows="10" readonly {$TAG_INPUT_ENABLED}>{$UAM_CONFIRMMAIL_REMAIL_TXT2}</textarea>
    441441                <br><br>
    442442                </li>
     
    473473            {if $UAM_GHOSTRACKER_TRUE}
    474474              <li><label class="cluetip" title="{'UAM_gttextTitle'|translate}|{'UAM_gttextTitle_d'|translate}">{'UAM_GhostTracker_ReminderText'|@translate}</label><br><br>
    475                 <textarea name="UAM_GhostTracker_ReminderText" id="UAM_GhostTracker_ReminderText" rows="10" cols="80" {$TAG_INPUT_ENABLED}>{$UAM_GHOSTRACKER_REMINDERTEXT}</textarea><br><br>
     475                <textarea class="uam_textfields" name="UAM_GhostTracker_ReminderText" id="UAM_GhostTracker_ReminderText" rows="10" {$TAG_INPUT_ENABLED}>{$UAM_GHOSTRACKER_REMINDERTEXT}</textarea><br><br>
    476476              </li>
    477477            {else}
    478478              <li><label class="cluetip" title="{'UAM_gttextTitle'|translate}|{'UAM_gttextTitle_d'|translate}">{'UAM_GhostTracker_ReminderText'|@translate}</label><br><br>
    479                 <textarea name="UAM_GhostTracker_ReminderText" id="UAM_GhostTracker_ReminderText" rows="10" cols="80" readonly {$TAG_INPUT_ENABLED}>{$UAM_GHOSTRACKER_REMINDERTEXT}</textarea><br><br>
     479                <textarea class="uam_textfields" name="UAM_GhostTracker_ReminderText" id="UAM_GhostTracker_ReminderText" rows="10" readonly {$TAG_INPUT_ENABLED}>{$UAM_GHOSTRACKER_REMINDERTEXT}</textarea><br><br>
    480480              </li>
    481481            {/if}
  • extensions/NBC_UserAdvManager/branches/2.15/admin/template/uam.css

    r6776 r6787  
    1 label.cluetip
    2 {
    3   font-weight:bold;
    4 }
    5 
    6 legend.cluetip
    7 {
    8   font-weight:bold;
    9 }
    10 
     1/* UAM instructions */
    112#uam_leftmargin
    123{
     
    189  text-align:center;
    1910  text-decoration: underline;
     11  font-weight:bold;
     12}
     13
     14textarea.uam_textfields
     15{
     16  width: 70%;
     17}
     18
     19/* jQuery cluetip instructions */
     20label.cluetip
     21{
     22  font-weight:bold;
     23}
     24
     25legend.cluetip
     26{
    2027  font-weight:bold;
    2128}
     
    6168}
    6269
     70/* jQuery tablesorter instructions */
    6371tr.throw
    6472{
  • extensions/NBC_UserAdvManager/branches/2.15/admin/template/userlist.tpl

    r6776 r6787  
    2020    {ldelim}
    2121      $("#sorting")
    22       .tablesorter({ldelim}sortList:[[3,0]]{rdelim})
     22      .tablesorter({ldelim}sortList:[[3,1]]{rdelim})
    2323      .tablesorterPager({ldelim}container: $("#pager"), positionFixed: false, size: 20, totalPages: 0{rdelim});
    2424    {rdelim}
     
    3939                        <tr class="throw">
    4040                        <th>{'Username'|@translate}</th>
     41            <th>{'Profile'|@translate}</th>
    4142                        <th>{'Email address'|@translate}</th>
    4243            <th>{'LastVisit_Date'|@translate}</th>
     
    4849          <tr class="{if $smarty.foreach.users_loop.index is odd}row1{else}row2{/if}">
    4950            <td><label for="selection-{$user.ID}">{$user.USERNAME}</label></td>
     51            <td style="text-align:center;"><a href="./admin.php?page=profile&amp;user_id={$user.ID}" title="{'Profile'|@translate}" onclick="window.open(this.href); return false;"><img src="{$UAM_PATH}admin/template/icon/edit_s.png"></a></td>
    5052            <td>{$user.EMAIL}</td>
    5153            <td style="text-align:center;">{$user.LASTVISIT}</td>
  • extensions/NBC_UserAdvManager/branches/2.15/admin/template/usermanager.tpl

    r6776 r6787  
    1919    {ldelim}
    2020      $("#sorting")
    21       .tablesorter({ldelim}sortList:[[5,1]], headers: {ldelim} 0: {ldelim} sorter: false {rdelim}{rdelim}{rdelim})
     21      .tablesorter({ldelim}sortList:[[6,1]], headers: {ldelim} 0: {ldelim} sorter: false {rdelim}{rdelim}{rdelim})
    2222      .tablesorterPager({ldelim}container: $("#pager"), positionFixed: false, size: 20, totalPages: 0{rdelim});
    2323    {rdelim}
     
    3636                        <tr class="throw">
    3737                        <th>&nbsp;</td>
    38                         <th>&nbsp;{'Username'|@translate}&nbsp;&nbsp;</th>
    39                         <th>&nbsp;{'User status'|@translate}&nbsp;&nbsp;</th>
    40                         <th>&nbsp;{'Email address'|@translate}&nbsp;&nbsp;</th>
    41                         <th>&nbsp;{'Groups'|@translate}&nbsp;&nbsp;</th>
    42                         <th>&nbsp;{'Registration_Date'|@translate}&nbsp;&nbsp;</th>
     38                        <th>{'Username'|@translate}&nbsp;&nbsp;</th>
     39            <th>{'Profile'|@translate}&nbsp;&nbsp;</th>
     40                        <th>{'User status'|@translate}&nbsp;&nbsp;</th>
     41                        <th>{'Email address'|@translate}&nbsp;&nbsp;</th>
     42                        <th>{'Groups'|@translate}&nbsp;&nbsp;</th>
     43                        <th>{'Registration_Date'|@translate}&nbsp;&nbsp;</th>
    4344          {if $CONFIRM_LOCAL == ""}
    44             <th>&nbsp;{'Reminder'|@translate}&nbsp;&nbsp;</th>
     45            <th>{'Reminder'|@translate}&nbsp;&nbsp;</th>
    4546          {/if}
    4647                        </tr>
     
    5152            <td><input type="checkbox" name="selection[]" value="{$user.ID}" {$user.CHECKED} id="selection-{$user.ID}" ></td>
    5253            <td><label for="selection-{$user.ID}">{$user.USERNAME}</label></td>
     54            <td style="text-align:center;"><a href="./admin.php?page=profile&amp;user_id={$user.ID}" title="{'Profile'|@translate}" onclick="window.open(this.href); return false;"><img src="{$UAM_PATH}admin/template/icon/edit_s.png"></a></td>
    5355            <td>{$user.STATUS}</td>
    5456            <td>{$user.EMAIL}</td>
  • extensions/NBC_UserAdvManager/branches/2.15/changelog.txt.php

    r6776 r6787  
    185185            Bug 1790 fixed - Validation tracking tab is set when correct options are set
    186186            Bug 1795 fixed - Fixes rules using email information and/or email of validation
     187
     188-- 2.15.5 : Bug 1693 fixed - Multi-languages are available for ConfirmMail customization (using Extended Description plugin)
     189            Bug 1727 fixed - The redirection does not appli to admins, webmaster and generic users.
     190            Bug 1807 fixed - Textareas are resized according the screen resolution
     191            Bug 1808 fixed - The Tracking users table is ordered by default on "LastVisit" field (last in at top)
     192            Bug 1809 fixed - Addition of a direct link to user's profile in all UAM tables. The link gives a new window
     193            Bug 1810 partially fixed - Auto login is not performed after visitors have validated their registration but the "home" button changes his link to redirect to identification page when the redirection option is set. Note: The redirection to profile.php doesn't work because I was unable to use the log_user() function on ConfirmMail page. This feature is still under investigation to perform the best way.
    187194*/
    188195?>
  • extensions/NBC_UserAdvManager/branches/2.15/include/functions.inc.php

    r6776 r6787  
    387387    }
    388388   
    389     return get_absolute_root_url().UAM_PATH.'ConfirmMail.php?key='.$Confirm_Mail_ID;
     389    return get_absolute_root_url().UAM_PATH.'ConfirmMail.php?key='.$Confirm_Mail_ID.'&userid='.$user_id;
    390390  }
    391391}
     
    458458                pwg_query($query);
    459459   
    460     return get_absolute_root_url().UAM_PATH.'ConfirmMail.php?key='.$Confirm_Mail_ID;
     460    return get_absolute_root_url().UAM_PATH.'ConfirmMail.php?key='.$Confirm_Mail_ID.'&userid='.$user_id;
    461461  }
    462462}
     
    505505  $tab = array();
    506506
    507   $query = "
     507  $query = '
    508508SELECT value
    509 FROM ".CONFIG_TABLE."
    510 WHERE param = 'UserAdvManager_Redir'
    511 ;";
     509FROM '.CONFIG_TABLE.'
     510WHERE param = "UserAdvManager_Redir"
     511;';
    512512
    513513  $tab = pwg_db_fetch_row(pwg_query($query));
     
    527527
    528528/* Function called from ConfirmMail.php to verify validation key used by user according time limit */
     529/* Return true is key validation is OK else return false */
    529530function VerifyConfirmMail($id)
    530531{
  • extensions/NBC_UserAdvManager/branches/2.15/main.inc.php

    r6776 r6787  
    22/*
    33Plugin Name: UserAdvManager
    4 Version: 2.15.4
     4Version: 2.15.5
    55Description: Renforcer la gestion des utilisateurs - Enforce users management
    66Plugin URI: http://fr.piwigo.org/ext/extension_view.php?eid=216
     
    1313/*
    1414 ***** TODO List *****
    15 ++ No validation needed for admins users comments (new trigger needed in comments.php ?)
    16 
    17 ++ No single email check for admins (new trigger needed in functions_user.inc.php ?)
    18 
    19 ++ Password control and enforcement
    20   ?? Can not be the same as username -> Could password score control be sufficient ?
    21  
    22 ++ Security : Blocking brut-force attacks !
    23               -> Way to do that : Count the number of failed attempts to connect and lock the targetted account after x attempts. Where x will be settable by admin.
    24               To unlock the locked account :
    25                -> A new table in admin's plugin panel which would display the locked accounts.
    26                -> Sending an email to account owner to inform him his account is blocked due to multiple failed connexions attempts. This email could have a link with a security key to unlock the account.
    27                -> Both of above solutions ?
    28 
    29 ++ Opportunity to copy a registered user for new user creation
    30   ++ new copied user will (or not) belong to the same groups
    31   ++ new copied user will (or not) get the same status (visitor, admin, webmaster, guest (??))
    32   ++ new copied user will (or not) get the same properties
    33   ++ new copied user will (or not) get the same language
    34   ... and so on
     15See project bugtracker: http://piwigo.org/bugs/my_view_page.php
    3516*/
    3617
     
    416397
    417398// RedirectToProfile - Thx to LucMorizur
    418 // redirects a visitor (not generic (forbidden) neither admin) to his
     399// redirects a visitor (except for admins, webmasters and generic statuses) to his
    419400// profile.php page
    420401//
     
    427408 
    428409  $conf_UAM = unserialize($conf['UserAdvManager']);
    429 
    430   if ((isset($conf_UAM[21]) and $conf_UAM[21] == 'true'))
    431   {
    432     $user_idsOK = array();
    433     if (!check_consult($user['id'], $user_idsOK))
    434       redirect(PHPWG_ROOT_PATH.'profile.php');
     410 
     411  $query ='
     412SELECT user_id, status
     413FROM '.USER_INFOS_TABLE.'
     414WHERE user_id = '.$user['id'].'
     415;';
     416  $data = pwg_db_fetch_assoc(pwg_query($query));
     417 
     418  if ($data['status'] <> "admin" and $data['status'] <> "webmaster" and $data['status'] <> "generic")
     419  {
     420    if ((isset($conf_UAM[21]) and $conf_UAM[21] == 'true'))
     421    {
     422      $user_idsOK = array();
     423      if (!check_consult($user['id'], $user_idsOK))
     424        redirect(PHPWG_ROOT_PATH.'profile.php');
     425    }
    435426  }
    436427}
  • extensions/NBC_UserAdvManager/branches/2.15/template/ConfirmMail.tpl

    r5634 r6787  
    55    <ul class="categoryActions">
    66      <li>
     7    {if $REDIRECT}
     8        <a href="{$ROOT_URL}identification.php" title="{'return to homepage'|@translate}">
     9          <img src="{$ROOT_URL}{$themeconf.icon_dir}/home.png" class="button" alt="{'home'|@translate}">
     10        </a>
     11    {else}
    712      {if isset($GALLERY_URL)}
    813        <a href="{$GALLERY_URL}" title="{'return to homepage'|@translate}">
     
    1419        </a>
    1520      {/if}
     21    {/if}
    1622      </li>
    1723    </ul>
Note: See TracChangeset for help on using the changeset viewer.