{"id":8659,"date":"2025-05-12T17:48:42","date_gmt":"2025-05-12T15:48:42","guid":{"rendered":"https:\/\/www.axew3.com\/w3\/?p=8659"},"modified":"2026-11-18T22:53:54","modified_gmt":"2026-11-18T21:53:54","slug":"phpbb-user-session-update","status":"publish","type":"post","link":"https:\/\/www.axew3.com\/w3\/2025\/05\/phpbb-user-session-update\/","title":{"rendered":"phpBB user session update"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Since plugin version <strong>2.9.6<\/strong> &gt;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Note that this normally NOT required<\/strong>! But you know that it is possible&#8230;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A while ago, someone asked how to stop the <code><strong>verify_phpbb_credentials()<\/strong><\/code> function\u2014which updates user data and the phpBB session\u2014from running every time a WordPress page loads.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">By default, this option is not included on the plugin&#8217;s admin configuration page. Functions like <code>verify_phpbb_credentials()<\/code> and the <em>Last Topic Heartbeat shortcode<\/em> (when used) are the main two features that can impact server performance. All other plugin functions and hooks only run when a user performs a specific action, such as registering in WordPress or updating their profile. Even those two functions normally execute in milliseconds, so you won&#8217;t notice any difference on an uncached site whether the integration plugin is active or not. That said, very large sites\u2014or anyone else\u2014might still find this option useful.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-custom-cyan-1-color\"><strong>To do so<\/strong><\/mark><\/strong> just open up with a text editor the <strong>wp_config.php<\/strong> file (or <strong>add<\/strong> the line of code anywhere inside the <strong><a href=\"https:\/\/www.axew3.com\/w3\/2025\/06\/wordpress-phpbb-custom-code-file\/\">custom_functions.php<\/a><\/strong> file, if you are using it) and maybe just after the line<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/* That's all, stop editing! Happy publishing. *\/<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>add the following line of code<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>define('WPW3ALL_ULOGGED_NOPHPBBCREDENTIALS', 1);<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-custom-cyan-1-color\">Note that<\/mark><\/strong>:<br>By avoiding the execution of <code>verify_phpbb_credentials()<\/code> every time a WordPress page loads, the function will only run when a user is logged out of WordPress but visits with a valid phpBB session cookie. In this case, the user will be logged into WordPress (and created if they do not exist yet). At the same time, profile fields like their URL or email will also be updated if they do not match<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-custom-cyan-1-color\">PM shortcodes<\/mark> (pm notifications shortcodes) <strong>will not work<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>NOTE:<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-custom-cyan-1-color\"> the user require to be as MANDATORY<\/mark> allowed to update the profile email, password and url ONLY into WordPress<\/strong> if the phpBB WordPress extension has not been installed into phpBB.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If the phpBB user session expires because it is no longer updated on the WordPress side by <code>verify_phpbb_credentials()<\/code>, the user may simply need to log into the forum again. However, this shouldn&#8217;t be a big issue. When a user logs into WordPress, a long-term &#8216;Remember Me&#8217; cookie is created. As long as you configure your phpBB session settings as explained in the installation steps (setting the cookie to last for months or 365 days), users will rarely need to log in again.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Note:<\/strong> Your phpBB cookie session settings must match this long-term behavior; otherwise, phpBB will follow its own rules and log the user out early, even if a long-term cookie exists. To prevent this, go to <strong>phpBB ACP &gt; Security settings<\/strong>, set <strong>Allow &#8220;Remember Me&#8221; logins<\/strong> to <strong>Yes<\/strong>, and adjust the <strong>&#8220;Remember Me&#8221; login key expiration length (in days)<\/strong> value to match.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That&#8217;s all.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Since plugin version 2.9.6 &gt; Note that this normally NOT required! But you know that it is possible&#8230; A while ago, someone asked how to stop the verify_phpbb_credentials() function\u2014which updates user data and the phpBB session\u2014from running every time a WordPress page loads. By default, this option is not included on the plugin&#8217;s admin configuration [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[42,232,233,41],"class_list":["post-8659","post","type-post","status-publish","format-standard","hentry","category-wordpress-phpbb-integration","tag-phpbb","tag-phpbb-session","tag-user-session-update","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/www.axew3.com\/w3\/wp-json\/wp\/v2\/posts\/8659","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.axew3.com\/w3\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.axew3.com\/w3\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.axew3.com\/w3\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.axew3.com\/w3\/wp-json\/wp\/v2\/comments?post=8659"}],"version-history":[{"count":3,"href":"https:\/\/www.axew3.com\/w3\/wp-json\/wp\/v2\/posts\/8659\/revisions"}],"predecessor-version":[{"id":11649,"href":"https:\/\/www.axew3.com\/w3\/wp-json\/wp\/v2\/posts\/8659\/revisions\/11649"}],"wp:attachment":[{"href":"https:\/\/www.axew3.com\/w3\/wp-json\/wp\/v2\/media?parent=8659"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.axew3.com\/w3\/wp-json\/wp\/v2\/categories?post=8659"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.axew3.com\/w3\/wp-json\/wp\/v2\/tags?post=8659"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}