But when I wanted to hide an obscure and possibly meaningless warning message on the user account edit page (so that new members would not get freaked and think they did something wrong) I struggled.
First I hacked the user.module and although I removed the warning I also gave everybody admin access, including people who are not even logged in - not a good idea.
So I used CSS to hide the warning messages on "body-page.user" which seemed to do the trick.
Then my client told me he was having trouble creating new accounts, and I realized that I hid ALL user module warnings including "User name xxxx already exists" so I was back with the ugly warning.
I decided to figger out the best jQuery method. I came up with one line of jQuery code to add to my theme template that did the trick:
(note: the .messages selector is crucial; without it, all divs that are parents of the warning are also hidden, effectively hiding the entire page!)
now about that PHP warning...