MyBB Community Forums

Full Version: Log In for site?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Is it possible to make that you need to log into your forum account to access the site?

Also post your forum details on the site. E.g Welcome to the site, your logged on as *forum username*?
(2010-01-25, 08:09 PM)Polarbear541 Wrote: [ -> ]http://community.mybboard.net/thread-6190.html this might help...

Thank you. Anyone else?Smile
For the login to view thing, if you mean they have to be logged into your forum to view your forum then just go ACP > Users & Groups > Groups > Guests > Forums and Posts then unselect "Can view board".

With your second question, do you want it to say that when they log in or just somewhere in the design like where it says "Welcome back, yourusername." up the top?
(2010-01-26, 12:12 AM)TimB. Wrote: [ -> ]For the login to view thing, if you mean they have to be logged into your forum to view your forum then just go ACP > Users & Groups > Groups > Guests > Forums and Posts then unselect "Can view board".

With your second question, do you want it to say that when they log in or just somewhere in the design like where it says "Welcome back, yourusername." up the top?

No, what I want is so that you need to log in to view the site and Forum Smile
<?php
define("IN_MYBB", 1);
define("THIS_SCRIPT", "pagename.php");
require("forums/global.php");

if($mybb->user['uid'] === 0) {

      error_no_permission(); //Fix via MattRogowski. See below post :P

} else {

      echo "Hai, ".$mybb->user['username']."! You have ".$mybb->user['unreadpms']." inbox messages.";

}
?>
error_no_permissions();

Not plural Smile

error_no_permission();
(2010-01-26, 05:04 PM)MattRogowski Wrote: [ -> ]
error_no_permissions();

Not plural Smile

error_no_permission();

Fixed Toungue
Thanks very much above. How do I add more uids, do I use a comma?
$allowed = array("1", "2", "3", "4");
if(in_array($mybb->user['uid'], $allowed))
{
...

That will only allow people through who are in that list.
Pages: 1 2