Tony,
The simple login redirect works on my site, after I cleared everything out. When I visit my access denied page, with the login, and add a ?destination= page, it works.
The redirect works to go to the civicrm page.
When I upload the template.php file with the code, the redirect to the access denied page works, the address bar includes the redirect to the member directory, but after logging in it goes right back to the access denied page. (looping)
Also while logged in, when trying to access the civicrm member directory profile directly, it takes me to the access denied page with the ?= redirect in the address bar. (I'm logged in, so my login block doesn't show up).
My template.php file is really the same as garland, other than the code I'm putting in for this...
I'm afraid the if statement isn't working right, but I don't know php code enough... it's like, once logged in, it gets stuck going to that page, and ignores the if statement. It just does it no-matter if you're logged in.
Thanks for any advice. I'll keep you posted on any progress.
bmodesign