mindstellar / Osclass

With Osclass, get your own classifieds site for free. Build your own Osclass installation and start advertising real estate, jobs or whatever you want- in minutes!
https://docs.mindstellar.com/
GNU General Public License v3.0
90 stars 49 forks source link

Show e-mail checkbox is always enabled #441

Closed navjottomer closed 7 months ago

navjottomer commented 3 years ago

In the new version of the site, the Show e-mail checkbox is always enabled, it cannot be turned off even by the administrator.

Originally posted by @buninsan in https://github.com/mindstellar/Osclass/discussions/435#discussioncomment-1659984

eurobank commented 3 years ago

@buninsan Does this fix work for you?

patriksh commented 2 years ago

This fixed the "always enabled" but there's still problems with how value is read from session. For me it now always kept it unchecked.

if (Session::newInstance()->_getForm('showEmail') != 0) should probably be if (Session::newInstance()->_getForm('showEmail') != "") in show_email_checkbox.