[eluser]jedd[/eluser]
[quote author="Tego10122" date="1254884530"]I want to be able to put the following in my controller....
$this->model_name->info_function('username'); and echo "the persons user name"[/quote]
Well, once you put a
return in front of the $member->$string; call in your model, you should be pretty much there.
A couple of extra comments, however.
You might want to have attributes in your User model that are populated by an init($username) method. This means you won't hit the database whenever you pull user, pass, prefs, etc. Instead you'd do something like (in your controller):
Code:
$this->User->load_details($username);
$user_name = $this->User->username;
Your query is a bit messy given you're matching user and pass - surely you only need to match user? Once you're authenticated, you don't need to keep the password around, especially not in the session data - it's not that it's insecure, it's just that it's irrelevant. (And possibly a tad insecure.)