SACRAMENTO, Calif. (AP) — The state Senate has sent Gov. Jerry Brown a bill that would make it illegal for colleges and universities to demand social media user names and passwords from students and employees.

The Senate unanimously approved SB1349 by Sen. Leland Yee, a Democrat from San Francisco, on Tuesday.

Yee says colleges and employers who seek passwords for sites such as Facebook and Twitter can gain access to protected information such as age, race, religion and sexual orientation. It's illegal to use that information to make hiring or admission decisions.

A companion bill, AB1844, is awaiting a final vote in the Assembly. It would ban employers from requiring current or prospective employees to disclose the same information.

The governor has until Sept. 30 to act on the bill.