user model: if we don't get an explicit username, use the active user

and while we're at it change spaces to tabs
This commit is contained in:
Karsten Heiken
2011-07-31 18:28:17 +02:00
parent f31d78ef96
commit 79e36493db

View File

@@ -188,7 +188,9 @@ class User extends CI_Model {
*/
public function profile($username = '', $isCode = false) {
if (empty($username)) {
return false;
@$username = $this->session->userdata('username');
if(empty($username))
return FALSE;
}
$this->db->select('users.*, groups.name AS `group`, groups.description AS `group_description`');