Phpcms Reception exit Log in when the message ' exit Success 0 '

Source: Internet
Author: User
Tags cas urlencode

Issue background:

Phpcms The foreground exit login, prompted a successful exit 0

I'm so confused. Why is there a 0?

Problem Analysis:

Enter

./phpcms/modules/member/index.php

Find the logout method with the following code:

 Public functionlogout () {$setting= Pc_base::load_config (' System '); //sNDA Exit        if($setting[' snda_enable '] && param::get_cookie (' _from ') = = ' sNDA ') {param:: Set_cookie (' _from ', '); $forward=isset($_get[' Forward ']) &&Trim($_get[' Forward ']) ?UrlEncode($_get[' Forward ']) : ‘‘; $logouturl= ' https://cas.sdo.com/cas/logout?url= '.UrlEncode(App_path. ' Index.php?m=member&c=index&a=logout&forward= '.$forward); Header(' Location: '.$logouturl); } Else {            $synlogoutstr= ";//Synchronous exit JS Code            if(Pc_base::load_config (' System ', ' Phpsso '))) {                $this-_init_phpsso (); $synlogoutstr=$this->client->ps_member_synlogout (); } param:: Set_cookie (' auth ', '); Param:: Set_cookie (' _userid ', '); Param:: Set_cookie (' _username ', '); Param:: Set_cookie (' _groupid ', '); Param:: Set_cookie (' _nickname ', '); Param:: Set_cookie (' cookietime ', '); $forward=isset($_get[' Forward ']) &&Trim($_get[' Forward ']) ?$_get[' Forward ']: ' Index.php?m=member&c=index&a=login '; ShowMessage (L (' Logout_success ').$synlogoutstr,$forward);//Exit Success 0        }    }

Problem solving:

Note the showmessage of the last line, the first parameter inside is

L (' logout_success '). $synlogoutstr

On behalf of the message content, checked

./languages/zh-cn/member.lang.php

In logout_success really is the exit success four words, but this later spelled a $synlogoutstr, the examiner is really that 0, if you do not want him to exit the success of the show, Just remove the string and you can do it.

The string shown in the above code is synchronous exit JS, so it should be a status code, it might be useful for developers. ~mark, please.

Phpcms Reception exit Log in when the message ' exit Success 0 '

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.