Changeset 6784


Ignore:
Timestamp:
Aug 21, 2010, 6:31:47 PM (10 years ago)
Author:
Eric
Message:

Bug 1727 fixed - The redirection does not appli to admins, webmaster and generic users.
W3C HTML 4.0 strict compliance

Location:
extensions/NBC_UserAdvManager/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • extensions/NBC_UserAdvManager/trunk/admin/UAM_admin.php

    r6775 r6784  
    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/trunk/changelog.txt.php

    r6783 r6784  
    186186            Bug 1795 fixed - Fixes rules using email information and/or email of validation
    187187
    188 -- 2.15.5 : Bug 1807 fixed - Textareas are resized according the screen resolution
     188-- 2.15.5 : Bug 1727 fixed - The redirection does not appli to admins, webmaster and generic users.
     189            Bug 1807 fixed - Textareas are resized according the screen resolution
    189190            Bug 1808 fixed - The Tracking users table is ordered by default on "LastVisit" field (last in at top)
    190191            Bug 1809 fixed - Addition of a direct link to user's profile in all UAM tables. The link gives a new window
  • extensions/NBC_UserAdvManager/trunk/main.inc.php

    r6783 r6784  
    397397
    398398// RedirectToProfile - Thx to LucMorizur
    399 // redirects a visitor (not generic (forbidden) neither admin) to his
     399// redirects a visitor (except for admins, webmasters and generic statuses) to his
    400400// profile.php page
    401401//
     
    408408 
    409409  $conf_UAM = unserialize($conf['UserAdvManager']);
    410 
    411   if ((isset($conf_UAM[21]) and $conf_UAM[21] == 'true'))
    412   {
    413     $user_idsOK = array();
    414     if (!check_consult($user['id'], $user_idsOK))
    415       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    }
    416426  }
    417427}
Note: See TracChangeset for help on using the changeset viewer.