In testing Login destination I have run into some problems with the condition settings.
Running fresh load of Drupal5 with Bio.module and Login_destination.
I am trying to use the php snippet condition settings.

I have entered this code

global $user;
$result = db_query('select * from {node} where uid = %d and type = "bio"', $user->uid);
return (db_num_rows($result) == 0);

but it returns true and redirects no matter how many bio records exist (0,1,2)

Any ideas?

Comments

ardas’s picture

Please, debug this code to find out how many rows were found - use drupal_set_message() to output a number of records. If it will be always 0, you probably need to check your database query.

ardas’s picture

Status: Active » Closed (fixed)

Doesn't relate to this module.