Loading... 时间长了之后,很多用户可能会把自己的登陆密码忘记。那么一个能够自助找回密码的插件就显得尤为重要了。 ---------- 1.下载插件[Passport](https://github.com/mhcyong/Passport)并上传到plugins文件夹 2.打开 admin/login.php 文件,做以下修改: ``` // 找到这里 <?php if($options->allowRegister): ?> • <a href="<?php $options->registerUrl(); ?>"><?php _e('用户注册'); ?></a> <?php endif; ?> // 在它下面插入以下代码 <?php $activates = array_keys(Typecho_Plugin::export()['activated']); if (in_array('Passport', $activates)) { echo '<a href="' . Typecho_Common::url('passport/forgot', $options->index) . '">' . '忘记密码' . '</a>'; } ?> ``` 之后在登陆界面就会出现“忘记密码”的选项了。 最后修改:2023 年 10 月 15 日 © 允许规范转载 赞 1 如果觉得我的文章对你有用,请随意赞赏