benedmunds/CodeIgniter-Ion-Auth — Issue #153: Call to $this->ion_auth->user() required ->row() to retrieve data
Author: alexwybraniec
Created: 2012-01-09 17:57:48+00:00
State: open

(I'm new to CI, but not PHP, so this might be incorrect)

The documentation states...

```php
$user = $this->ion_auth->user();
echo $user->email;
```

to get the current user object's email address.

However, this only returns a reference, not a full object.

```php
$user = $this->ion_auth->user();
var_dump($user->username);
```
returns

```php

NULL

```

To get the full object, the code needs to be

```php
$user = $this->ion_auth->user()->row();
```

Let me know if this is a real issue, and I'll fork the code and update the documentation (or create a new public method to access the user data).