HowTo allow only a specific Group to Login?

Permalink 1 user found helpful
Hi!

What I am using:
I'm using the Login Block from the Marketplace.

My question:
Can somebody please tell me howto restrict logging in to the group "Dealers" only??

What I want:
Nobody except a member of the "Dealer" group is allowed to login through this login block.

By the way:
Logging in as member of the dealer group will give access to an URL. That's all.

Fernandos
 
Fernandos replied on at Permalink Reply
Fernandos
I know howto check for a user or group.
But howto exclude all except that group from logging in in the login block?
And where to put this code?
Sorry I'm just lost here..

<?php
$users = new user(); 
$userGroups = $users->getUserGroups();
$find1 = 'Dealers';
$key1 = array_search($find1, $userGroups);
$find2 = 'Guest';
$key2 = array_search($find2, $userGroups);
if($users->isSuperUser() == TRUE) {
   echo "You're superadmin!";
}
else if ($key1 != NULL || $key1 !== FALSE ) {
      echo "You're a Dealer!";
}
else if ($key2 != NULL || $key2 !== FALSE ) {
      echo "You're a Guest!";
Fernandos replied on at Permalink Reply
Fernandos
you can close this..
I had an understanding problem..
the problem is fixed. see here:http://fif-moebel.de look at the footer.