We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

How to change Remember Me to unchecked by default? [Solution Available] | Forum

Angel
Angel Jul 15 '13
Hello...


I wonder what line in what file should I modify to change the default "Remember me" value from "checked" to "false"..


For safety of my users, I need to make it unchecked by default >.<


Thank you!!

The Forum post is edited by Alia Jul 28 '14
ross Team
ross Jul 16 '13
Topic was moved from General Questions.
Daisy Team
Daisy Jul 18 '13
Angel, you can make changes in /ow_system_plugins/base/components/sign_in.php file, search for the remeberMe->setValue(true); string and change the value from true to false.

However, as you might know, we strongly recommend not to modify the core files because when you update your site - all the changes you've made will be lost.
Angel
Angel Jul 18 '13
Yaay, thank you so much, Daisy~


Yes, I always take notes of everything I've changed to the core files ^_^

Daisy Team
Daisy Jul 18 '13
You are welcome. :)
Alberto MC
Alberto MC Jan 16 '14
What about Oxwall 1.6? How  can I do it?
Daisy Team
Daisy Jan 17 '14
You can find this method in /ow_system_plugins/base/bol/user_service.php file.
Alberto MC
Alberto MC Jan 17 '14
Thanks a lot! Now Remember is unchecked in Oxwall 1.6, thnx again Daisy.
Daisy Team
Daisy Jan 24 '14
You are welcome.
Wilson
Wilson Jan 28 '14

If you need a little more detailed info on where to find it (in 1.6 version), it’s around this area toward the bottom of the page.



$form = new Form($formName);

        $username = new TextField('identity');
        $username->setRequired(true);
        $username->setHasInvitation(true);
        $username->setInvitation(OW::getLanguage()->text('base', 'component_sign_in_login_invitation'));
        $form->addElement($username);

        $password = new PasswordField('password');
        $password->setHasInvitation(true);
        $password->setInvitation('password');
        $password->setRequired(true);
        $form->addElement($password);

        $remeberMe = new CheckboxField('remember');
        $remeberMe->setLabel(OW::getLanguage()->text('base', 'sign_in_remember_me_label'));
        $remeberMe->setValue(true); <<<<<<<<<<<<<<<<<<<<<
        $form->addElement($remeberMe);

        $submit = new Submit('submit', $submitDecorator);
        $submit->setValue(OW::getLanguage()->text('base', 'sign_in_submit_label'));
        $form->addElement($submit);

        return $form;

Worked for me when I changed it to "false", thanks Daisy!

Wilson

The Forum post is edited by Wilson Jan 28 '14
Alberto MC
Alberto MC Jul 24 '14
it works for me...try to clear browser cache.