Title: [Plugin: Random Post Box] RPB Plugin Clears Entire Session
Last modified: August 20, 2016

---

# [Plugin: Random Post Box] RPB Plugin Clears Entire Session

 *  [waffleguy4](https://wordpress.org/support/users/waffleguy4/)
 * (@waffleguy4)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-random-post-box-rpb-plugin-clears-entire-session/)
 * Hi Random-Post-Box author,
 * I am also a plugin author of Better Backgrounds and have found this plugin is
   causing bugs for mine. I have made the fix and hope you can incorporate this 
   into the next release:
 * On line 57 of _random-post-box-load.php_
    it has the line: `unset($_SESSION['
   rpb_last_post']);`
 * My plugin is using _SESSION_ to know if the user has already visited the website.
   So in this plugin, using the “unset” command actually deletes all the cookies.
   The correct implementation I believe would be:
    `$_SESSION['rpb_last_post'] =
   NULL;`
 * Thanks!
 * [http://wordpress.org/extend/plugins/random-post-box/](http://wordpress.org/extend/plugins/random-post-box/)

The topic ‘[Plugin: Random Post Box] RPB Plugin Clears Entire Session’ is closed
to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/random-post-box.svg)
 * [Random Post Box](https://wordpress.org/plugins/random-post-box/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/random-post-box/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/random-post-box/)
 * [Active Topics](https://wordpress.org/support/plugin/random-post-box/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/random-post-box/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/random-post-box/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [waffleguy4](https://wordpress.org/support/users/waffleguy4/)
 * Last activity: [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-random-post-box-rpb-plugin-clears-entire-session/)
 * Status: not resolved