URI not as expected after running controller function

#1
[eluser]imcl[/eluser]
Hello friends,

Say my current URI is
Code:
mysite.example.com/profile/user

When I run the upload_avatar controller that's inside profile.php
Code:
//  mysite.example.com/profile/upload_avatar

    function upload_avatar() {
        if ($this->input->post('upload')) {
            $this->profile_model->upload_avatar();
        }
        $this->user();
    }

I expected that function to run and the resulting URI to be
Code:
mysite.example.com/profile/user

because of the last line containing
Code:
$this->user();


But instead, what happens is that the upload_avatar function runs OK, the page is reloaded as expected but the resulting URI now shows
Code:
mysite.example.com/profile/upload_avatar

Any ideas why this is happening?

Thanks.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.