I think what you need happens in sesson.inc<br><br>function sess_read($key) {<br>&nbsp;...<br>&nbsp; $user = db_fetch_object(db_query(&quot;SELECT u.*, s.* FROM {users} u INNER JOIN {sessions} s ON u.uid = s.uid WHERE s.sid = &#39;%s&#39;&quot;, $key));
<br><br>&nbsp; // We found the client&#39;s session record and they are an authenticated user<br>&nbsp; if ($user &amp;&amp; $user-&gt;uid &gt; 0) {<br>&nbsp;&nbsp;&nbsp; // 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> &lt;<a href="mailto:vitamona@gmail.com">vitamona@gmail.com</a>&gt; 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, &amp;$edit, &amp;$user, $category = FALSE) {
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if ($type == &#39;login&#39;) {<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.