I was an unnamed occupant for the last 3 years and my roommate suddenly was unable to pay the rent (I was paying half of the rent to him). We received a 3 day notice to pay rent or quit. My roommate at the time, move out! I wasn't able to move out in the 3 days, since it was at the last minute and wasn't informed of it. Pass the 3 days, the manager of the building came and talked to me totally unprofessional and told me that I have to be out that day by 6pm and that if not he will change the lock, call the police and will call the goodwill to give my belongnings (which he called crap). Of course I did not move out that day!! A few days later he turned the power off (I called the DWP and they told me to go turn it back on). Unfortunatly the meter is in a locked room....
Family Law Attorney
By changing the locks and turning off your power, the landlord engaged in "self-help" which is blatantly illegal. This is such a basic concept that any even half-way sophisticated landlord knows not to do. As a result, I've never had a case where the landlord has done it. I'm fairly certain, though, that if you sued the landlord for this, you could get either your actual damages or a penalty of up to $100/day that your power stays off, etc. Please google "California Civil Code 789.3". I have linked it below and explicitly says that a landlord cannot interrupt utilities or change locks with the intent of forcing a tenant out.
The second issue is the 3-day notice. Because your landlord did not receive rent, he is entitled to give a 3-day notice to quit to the occupants of the rental unit. Since your friend moved out, you're the only occupant being subject to this 3-day notice. What the landlord should have done is file an eviction lawsuit against you if you didn't pay rent by the end of the 3 days. He should not have engaged in self-help.
If your landlord was to file suit to evict you, it seems to me that he would win. You do not appear to have a defense based on what you wrote that would allow you to stay in the rental property. What I would suggest is this: negotiate with your landlord.
Explain to him that he broke the law by engaging in self-help and that you can and will sue him for money for it. However, if your landlord was willing to give you an extension of time (let's say you need an extra week beyond the 3 days) to move out, you won't sue him and you can both part ways and go on with your lives.
Negotiations depend very much on the facts of each situation so you'll have to know what you can reasonably ask for. My point is that because the landlord engaged in illegal self-help, that gives you a chip with which you can bargain for more time to move out and avoid going through an actual eviction suit.
Hope that helps. I am not in southern California, otherwise I would be happy to help you with this.
The answer provided above is based upon California and/or New York law and is based solely upon the limited information provided by the poster. No attorney-client relationship is created. A future in-person consultation may reveal additional facts that may change the answer provided.