As far I can tell, you only forgot to change the data. Replace your 'activate user' part of the code with a usermodel that actually changes the table.
PHP Code:
$data = array('active' => 1);
$this->db->update('users', $data, array('id' => $user_id));
You also need to check that the current user have the right privileges, so that only you (or an admin) can do it.