I think what you need happens in sesson.inc function sess_read($key) { ... $user = db_fetch_object(db_query("SELECT u.*, s.* FROM {users} u INNER JOIN {sessions} s ON u.uid = s.uid WHERE s.sid = '%s'", $key)); // We found the client's session record and they are an authenticated user if ($user && $user->uid > 0) { // user logged in via cookie Not sure if there is a way to do that via a hook. Perhaps extending hook_user to do that is a good idea. http://api.drupal.org/api/5/function/hook_user On 4/3/07, vitamona <vitamona@gmail.com> wrote:
hi, is there a way for intercept a user when login via cookie?
For example, when a user login with a form (no cookie stored) is possible to intercept them with hook user:
function hook_user($type, &$edit, &$user, $category = FALSE) { if ($type == 'login') {
Thanks a lot
Vita
-- 2bits.com http://2bits.com Drupal development, customization and consulting.