[eluser]Unknown[/eluser]
[quote author="Alex." date="1215051203"]Hey this looks like a great library, was just about to start using it when I noticed a few snags / concerns!
EDIT1: Also, if the user is logged in when an admin bans them, wouldn't they still be classed as 'logged in' until their session expires?
EDIT: Ignore the stuff below, I found some posts in this thread
Please forgive me for not checking if any my comments have been raised before, but I don't have much time and 20 pages are quite time consuming to go through....
First off, the examples -
Line 11, example files/controllers/user.php
<code>
$data1['username'] = $this->redux_auth->get_username($this->session->userdata('id'));
</code>
function get_username() does not exist in the library. Without this function I personally can't see anyway to retrieve the username / other user details without querying the database myself.
Is this intended?
If it is, may I ask why there aren't any models to access the data?
Also, it might be a good idea to allow a 'default username' option / guest user so as to make it easier to handle users who aren't logged in.[/quote]
hi alex,
you can solve this issue by adding this code to the redux_auth.php library.
Code:
public function get_username($id){return $this->_get_username($this->users_table, $id);}
protected function _get_username ($users, $id)
{
$i = $this->ci->db->select($users.'.username')
->from($users)
->where($users.'.id', $id)
->limit(1)
->get();
return $var = ($i->num_rows() > 0) ? $i->row()->username : false;
}
.. and i am looking forward to version 1.4 :-)
regards,
max