There is a lot of conflict in connection with medical marijuana. The State law permits you to use and grow limited amounts of marijuana for your own personal use. However, cities and counties have been allowed to enact a ban on medical marijuana. Mostly, such bans apply to larger operations and do not prohibit individual use. So, if you have a doctor's recommendation and grow your own plants within the allowable amounts, for your own use, then you would probably be okay.
If you get arrested, contact an criminal defense attorney or one familiar with med. marijuana.
You might want to contact an advocacy group for more information. See the link below.