Sidebar hide

Hello, im really needing some help, i searched in the forum but without success.

I just want to as soon as someone is logged in to have the sidebar closed (ie not expanded) i tried searching all over the place for a boolean or something to do that but i couldnt.

Much thank you.