Logged In: NO

I've got the same problem.
The problem is that when someone writes a message the
from_userid field is not insert in database so you can see
that someone had send you something but you don't know who
and you can't click in his name to read the message.

The problem is here:
______________________________________
$sql = "INSERT INTO $prefix"._priv_msgs." (msg_image,
subject, from_userid, to_userid, msg_time, msg_text) ";
$sql .= "VALUES
('$image', '$subject', '$userdata
[uid]', '$to_userid', '$time', '$message')";
----------------------------------------
The $userdata[uid] variable is null.

Well, i'm trying to find the solution but is my first time
with php-nuke.

Bye!