I need some help with the redirect conditions. I need to be able to redirect to node/add/whatever if they are in a specific role and have not already created a node for whatever. For the URL destination settings i am using a PHP snippet to test for which role they belong to and that part works perfectly. In the Redirect Conditions I am also trying to use a PHP snippet, but I can't seem to get it to work at all. Here is what I have as my Redirect snippet
if ($user->roles[DRUPAL_VENDOR_RID] == 'vendor' {
$result = db_query('SELECT * from {node} WHERE uid=%d and type='%s'',$user->uid,'vendor_form');
return $result;
}
I've tried variations of this snippet, but nothing seems to work.
Thank you for your help!
Comments
Comment #1
rsvelko commentedyou have many mistakes :)
Will help you after the new version works and is released.
And after you update to it.
Comment #2
cybermache commentedIt seems to me like your code's main misses are that you aren't returning a url and that you are missing a check to see if there is any content for that user. Perhaps.
This is using version 6.x-2.12.
Comment #3
priyankprajapati commentedHi friends.
I have download and install the drupal 7.32. i use many custom module in my site. before some days my core login functionality work properly. after that i have instal and uninstall many module.
now when i enter the proper credential after that i click on the login button that time page can't be redirect. its not work properly. when we refresh the page then it will display the login successfully
when we click on login button many time but page can t be redirect
so how can i solve the my problem ?