sort posts by dates

function to sort posts by dates
on line 9 I assigned the posts to the variable @current_user_posts so I think you should use that to order.. so combine lines 9 + 10