用cas实现mantis单点登录和登出

上传人:宝路 文档编号:2356341 上传时间:2017-07-23 格式:DOC 页数:3 大小:46.50KB
返回 下载 相关 举报
用cas实现mantis单点登录和登出_第1页
第1页 / 共3页
用cas实现mantis单点登录和登出_第2页
第2页 / 共3页
用cas实现mantis单点登录和登出_第3页
第3页 / 共3页
亲,该文档总共3页,全部预览完了,如果喜欢就下载吧!
资源描述

《用cas实现mantis单点登录和登出》由会员分享,可在线阅读,更多相关《用cas实现mantis单点登录和登出(3页珍藏版)》请在金锄头文库上搜索。

1、用 cas 实现 mantis 单点登录和登出:1. 在论坛根目录下添加 casphp 目录,目录下包含 cas 的 php 客户端验证等相关文件;(内容见后面的附录)2 修改根目录下的 login_page.php (备份修改前文件为 login_page.php.bak):27 行开始(在 require_once( core.php )前添加) :require_once casphp/login_cas.php; $staffid = phpCAS:getUser(); /获取 cas 登录的用户名(工号)44 行开始(在$f_username = gpc_get_string( us

2、ername, )后添加):if ($f_username = )$f_username = $staffid; if( user_is_name_unique( $f_username ) ) /如果用户不存在,则创建用户user_create( $f_username,$f_ ) ; 107 行(在前添加):260 行(在前添加):265行(在/ 前添加):window.document.login_form.submit();/自动提交登录 FORM 3取消密码校验,注释掉 mantisbt/core/authentication_api.php 文件中的以下内容:/*if( Y!=$f

3、_discuzflag & !auth_does_password_match( $t_user_id, $p_password ) ) user_increment_failed_login_count( $t_user_id );return false;*/4修改根目录下的 logout_page.php (备份修改前文件为 logout_page.php.bak):23 行开始(在 require_once( core.php )前添加) :require_once casphp/login_cas.php; 30 行(在 auth_logout()之后添加 ):phpCAS:logout();附:casphp 目录:该目录下的文件除了 login_cas.php 以后,其余都是来自 phpCAS-1.3.0RC1 包中,可以从http:/downloads.jasig.org/cas-clients/php/中下载,Login_cas.php 源码:

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 中学教育 > 试题/考题

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号