I need to register a user and redirect the URL.
How do I do this in Drupal 7?
thanks
You must call user_logout() .
user_logout()
use it somewhere
<?php module_load_include('pages.inc', 'user'); user_logout(); ?>
Another option is to use the rule module. You can set the rule before redirecting to the URL after the user logs out and, if necessary, use other other rules.
http://drupal.org/project/rules