find out object properties passed to a function
You can make use of the devel module for debugging.

Download and install the latest version of the Devel module.

dpm()
Prints a variable to the ‘message’ area of the page using 

dvm()
Uses var_dump() to print a variable to the ‘message’ area of the page 

So in your situation in your function use dpm($account)

function election_example_conditions_access_gmail($post, $account) {
   dpm($account)
  if ($account-&gt;uid == 0) {
    return FALSE;
  }
  return (bool) preg_match('/g(oogle)?mail\.com$/i', $account-&gt;mail);
}


and go to the page normally and you should see the debug backtrace appear in the message area