fixbug: unless($user) is always false. refact: add_post($post,$user) is deprecated.