在 Magento 中禁用客户
我想向管理员提供禁用登录帐户的选项,不会从帐户中删除任何数据,但如果为不再使用它的用户禁用,一旦清除,用户将不会注意到任何新闻通讯或其他任何内容,只是最后一封邮件通知停用您的帐户。
I want to include to the administrator the option to disable login accounts, no data would be erased from the account, but if would be disabled for users not using it more, once cleared, the user would not notice any newsletters or anything else, just one last mail notifying the deactivating your account.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是一件有趣的事。我之前研究过这个问题,客户数据库记录上有一个
is_active
标志,但核心 Magento 代码不会在任何地方访问或写入它。为了满足此要求,您需要覆盖Mage_Customer_AccountController
检查loginPostAction()
内此字段的值,然后使该字段在 adminhtml Customer 块中可见。我对实现该代码有点紧张,因为 Varien 会包含该字段但根本不使用它,这让我感到困扰。我对其他人对此的想法很感兴趣。
哈特哈,
京东
This is an interesting one. I've looked into this previously, and there is an
is_active
flag on the customer database record, but it is not accessed or written anywhere by the core Magento code. In order to achieve this requirement, you'll need to override theMage_Customer_AccountController
to check the value of this field insideloginPostAction()
and then to make that field visible within the adminhtml Customer blocks.I'm a little nervous about implementing that code as it bothers me that Varien would include the field but not utilise it at all. I'd be interested in others' thoughts about this.
HTH,
JD
或者,您可以使用 Magento Connect 的这个免费扩展。
magentocommerce(死链接)客户激活扩展
编辑:< a href="https://github.com/Vinai/customer-activation" rel="nofollow noreferrer">Github 项目
Or, you could use this free extension from Magento Connect.
magentocommerce (deadlink) Customer Activation Extension
edit: Github project