I think what you need happens in sesson.inc<br><br>function sess_read($key) {<br> ...<br> $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));
<br><br> // We found the client's session record and they are an authenticated user<br> if ($user && $user->uid > 0) {<br> // user logged in via cookie<br><br>Not sure if there is a way to do that via a hook.
<br><br>Perhaps extending hook_user to do that is a good idea.<br><br><a href="http://api.drupal.org/api/5/function/hook_user">http://api.drupal.org/api/5/function/hook_user</a><br><br><div><span class="gmail_quote">On 4/3/07,
<b class="gmail_sendername">vitamona</b> <<a href="mailto:vitamona@gmail.com">vitamona@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
hi,<br>is there a way for intercept a user when login via cookie?<br><br>For example, when a user login with a form (no cookie stored) is<br>possible to intercept them with hook user:<br><br>function hook_user($type, &$edit, &$user, $category = FALSE) {
<br> if ($type == 'login') {<br><br>Thanks a lot<br><br>Vita<br></blockquote></div><br><br clear="all"><br>-- <br><a href="http://2bits.com">2bits.com</a><br><a href="http://2bits.com">http://2bits.com</a><br>
Drupal development, customization and consulting.