I am using an ajax page in a module to save data. In that when I used `JFactory::getUser()` I'm getting the result as

```
JUser Object
(
    [isRoot:protected] => 
    [id] => 0
    [name] => 
    [username] => 
    [email] => 
    [password] => 
    [password_clear] => 
    [usertype] => 
    [block] => 
    [sendEmail] => 0
    [registerDate] => 
    [lastvisitDate] => 
    [activation] => 
    [params] => 
    [groups] => Array()

[guest] => 1
[lastResetTime] => 
[resetCount] => 
[_params:protected] => JRegistry Object
    (
        [data:protected] => stdClass Object ()

    )

[_authGroups:protected] => 
[_authLevels:protected] => 
[_authActions:protected] => 
[_errorMsg:protected] => 
[_errors:protected] => Array()

[aid] => 0

```

As have logged in before running this code, why is this still returning 0 user id. Can any one help me on this....