作为一个在许多大型开源项目中工作了超过15年的web开发人员,我认为这是目光短浅且毫无帮助的。问题是,您还不如去掉选项并将它们硬编码到代码中。在我看来,这个代码已经被破坏了,它是不完整的。您为最终用户提供了一个选择,即我是否希望被记住,并通过将该选项硬编码到代码中来消除他们的选择。事实上,你已经做了两次,‘记住我’和‘匿名登录我’。要向代码中添加真正的功能,这些设置应该存储在成员数据库中,并给出一个完整的可记忆状态。这个代码在登录表单这里:<李类= ' ipsField ipsField_checkbox ' > < input type =“复选框”id =“inline_remember”=“检查”检查name = ' rememberMe ' value = ' 1 '类= ' input_check ' / > < div class = ' ipsField_content ' > <标签= ' inline_remember ' > <强> {$ this - >朗- >字[' rememberMe ']} < /强> < br / > <跨类=“desc轻”> {$ this - >朗- >字[' notrecommended ']} < / span >
设置”(“disable_anonymous”)> <李类=“ipsField ipsField_checkbox ' > < input type =“复选框”id =“inline_invisible”name =“匿名”value = ' 1 '类= ' input_check ' / > < div class = ' ipsField_content ' > <标签= ' inline_invisible ' > <强> {$ this - >朗- >文字[' form_invisible ']} < /强> < br / > < = ' desc跨类 lighter'>{$this->lang->words['anon_name']} Today, I had a member asking us why they couldn't change the setting for 'Remember me' and why we all made him sign in automatically all the time I told him to un-check the remember me check box and that should fix his issue. I was really surprised that the option was hard coded and a choice was taken away from the member, all because of short-sighted coding. This gentleman is 78 and he states himself that he find computers hard enough, we as developers shouldn't be making it harder on the end user or more confusing when something as simple as checking or unchecking a box is concerned. If I, as the end user do not wish to be remembered, then you are forcing me into perform another action (Ie move a mouse and click it) and this can cause different issues, frustration and (possibly) over a longer period of time 'Repetitive Strain Injury'. It is a QOL issue, sort it.