Changeset 636

Show
Ignore:
Timestamp:
04/13/08 13:17:52 (7 months ago)
Author:
areski
Message:

add some parameters to give more flexibility on distant login and forget password use

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.3/A2BCustomer_UI/forgotpassword.php

    r2 r636  
    8888{ 
    8989    $error = 3; 
     90} 
     91 
     92if(strlen(RETURN_URL_DISTANT_FORGETPASSWORD)>1 && $show_message){ 
     93        Header ("Location: $URL_CALLBACK_FORGETPASSWORD?error=$error"); 
     94        die(); 
    9095} 
    9196 
  • branches/1.3/A2BCustomer_UI/lib/defines.php

    r621 r636  
    103103define ("SIGNUP_LINK", isset($A2B->config["webcustomerui"]['signup_page_url'])?$A2B->config["webcustomerui"]['signup_page_url']:null);   
    104104define ("ACTIVATEDBYUSER", isset($A2B->config["signup"]['activatedbyuser'])?$A2B->config["signup"]['activatedbyuser']:null); 
     105define ("RETURN_URL_DISTANT_LOGIN", isset($A2B->config["webcustomerui"]['return_url_distant_login'])?$A2B->config["webcustomerui"]['return_url_distant_login']:null); 
     106define ("RETURN_URL_DISTANT_FORGETPASSWORD", isset($A2B->config["webcustomerui"]['return_url_distant_forgetpassword'])?$A2B->config["webcustomerui"]['return_url_distant_forgetpassword']:null); 
    105107 
    106108 
  • branches/1.3/A2BCustomer_UI/lib/module.access.php

    r1 r636  
    2727 
    2828 
     29if(strlen(RETURN_URL_DISTANT_LOGIN)>1) 
     30        $C_RETURN_URL_DISTANT_LOGIN = RETURN_URL_DISTANT_LOGIN;  
     31else  
     32        $C_RETURN_URL_DISTANT_LOGIN = 'index.php'; 
     33 
    2934if (isset($_GET["logout"]) && $_GET["logout"]=="true") {  
    3035           session_destroy(); 
    3136           $cus_rights=0; 
    3237           Header ("HTTP/1.0 401 Unauthorized"); 
    33            Header ("Location: index.php");        
     38           Header ("Location: $C_RETURN_URL_DISTANT_LOGIN");      
    3439           die();           
    3540        } 
     
    4651        return $data; 
    4752} 
     53 
     54 
    4855 
    4956if ((!session_is_registered('pr_login') || !session_is_registered('pr_password') || !session_is_registered('cus_rights') || (isset($_POST["done"]) && $_POST["done"]=="submit_log") )){ 
     
    6976            if(is_int($return)) 
    7077            { 
    71                 if($return == -1) 
    72                 { 
    73                                 Header ("Location: index.php?error=3"); 
     78                if($return == -1) { 
     79                                Header ("Location: $C_RETURN_URL_DISTANT_LOGIN?error=3"); 
     80                } else { 
     81                    Header ("Location: $C_RETURN_URL_DISTANT_LOGIN?error=2"); 
    7482                } 
    75                 else 
    76                 { 
    77                     Header ("Location: index.php?error=2"); 
    78                 } 
    79             } 
    80             else 
    81             { 
    82                 Header ("Location: index.php?error=1"); 
     83            } else { 
     84                Header ("Location: $C_RETURN_URL_DISTANT_LOGIN?error=1"); 
    8385            } 
    8486                        die(); 
  • branches/1.3/A2BCustomer_UI/templates_c

    • Property svn:ignore set to
      *.tpl.php
  • branches/1.3/a2billing.conf

    r632 r636  
    163163; Email address to send the notification and error report - new DIDs assigned will also be emailed. 
    164164error_email = root@localhost 
     165 
     166; URL for specific return if an error occur after login 
     167return_url_distant_login = 
     168 
     169; URL for specific return if an error occur after forgetpassword 
     170return_url_distant_forgetpassword = 
     171 
    165172 
    166173;SIP & IAX client configuration information. 
  • branches/1.3/A2Billing_UI/templates_c

    • Property svn:ignore set to
      *.tpl.php


Google