magento 验证码

来源:互联网 发布:电脑截图软件排名 编辑:程序博客网 时间:2024/06/06 07:20

1、在magento后台有两个地方是用来设置验证码的,一是system/config/user/user config/captcha,这是用来设置前台相关的验证码,二是system/confg/advanced/admin/captcha,这是用来设置管理员登录的验证码


2、但是如果我们在后台开启了对用户登录的验证码,用户登录的使用验证码仍然不会显示,这时候就需要在做一项配置

在任何已经激活的module的config.xml中添加如下配置:

<default>        <customer>                    <captcha>                        <always_for>                            <user_login>1</user_login>                        </always_for>                    </captcha>                </customer></default>

之所以这么做是因为在captcha模块的config.xml中对应的这段配置没有user_login这一项

<customer>            <captcha>                <type>zend</type>                <enable>0</enable>                <font>linlibertine</font>                <mode>after_fail</mode>                <forms>user_forgotpassword</forms>                <failed_attempts_login>3</failed_attempts_login>                <failed_attempts_ip>1000</failed_attempts_ip>                <timeout>7</timeout>                <length>4-5</length>                <symbols>ABCDEFGHJKMnpqrstuvwxyz23456789</symbols>                <case_sensitive>0</case_sensitive>                <always_for>                    <user_create>1</user_create>                    <user_forgotpassword>1</user_forgotpassword>                    <guest_checkout>1</guest_checkout>                    <register_during_checkout>1</register_during_checkout>                </always_for>            </captcha>        </customer>