Problems with login module after using false data

Professionally designed and responsive events Joomla template to launch your event based website.
GK User
Mon May 02, 2016 10:43 am
Hi there,

I use the Template Events with the extension membership pro.

I switched the joomla registration off (in users/settings/registration "no").

But: In the moment someone types in false user data he will redirected to /mysite.com/component/users/?view=login where inevitable the registration module is shown.
I then tried to use the module position "login" for the login module which will then show the "registration button" on the bottom of the module (although registration is switched off).
Please have a look at https://onlinekurs.graphicgarden.de
So it seems as if the template is the reason for this issue. (Actually I use the same extension with the University template and I don't have any issues).
Any advice?
Thanks for your help.
User avatar
Gold Boarder

teitbite
Wed May 04, 2016 2:39 pm
Hi

I'm afraid I do not understand. Please try to explain it a little better. Use some screenshots and tell me the access so I'll be able to see it while being redirected.

But first please try make a small test and switch to default joomla template and see if it's working same way. It's to check if it's a template fault or not.
User avatar
Moderator

GK User
Sun May 22, 2016 10:36 am
dear Titebite,

I want ot switch of the register possibility - I want to use ONLY the login Possibility

at the moment you can login - but if you make a mistake because of using the wrong login datas - the login modul jumps to the register possibility. it jumps to the component https://onlinekurs.graphicgarden.de/component/users/?view=login and this component makes the REGISTRATION possible. But I dont want this .
thanks for your support

How can I switch off the registration thing and surviving the LOGIN possibilitie.

picture one: login
gk_login.jpg


picture two login after wrong input
gk_login2.JPG
User avatar
Gold Boarder

teitbite
Tue May 24, 2016 10:06 am
Hi

Registration form ocan be found in /html/com_user/login/default_login.php simply remove it.

A link to registration form login popus can be changed in /layout/blocks/tools/login.php:

Code: Select all
                                        <?php if($userID == 0) : ?>
                                        <a class="button" href="<?php echo $this->API->URLbase(); ?>index.php?option=com_users&amp;view=registration"><?php echo JText::_('TPL_GK_LANG_REGISTER_POPUP'); ?></a>
                                        <?php endif; ?>
User avatar
Moderator

GK User
Tue May 24, 2016 6:56 pm
thanks Titebite - that works :D
User avatar
Gold Boarder

teitbite
Fri May 27, 2016 5:25 pm
Hi
Glad I could help.
---
If You were satisfied with our support please let other users know on Twitter: http://twitter.com/gavickpro or Facebook: http://www.facebook.com/gavickpro
User avatar
Moderator

GK User
Thu Mar 16, 2017 8:51 am
@Titebite: this solution is exactly what I'm looking for, also, but I'm not as "techie" as Eversberg. Could you please talk me through this solution? I've located the files you mention below, but am not sure what to "remove" where...

teitbite wrote:Registration form ocan be found in /html/com_user/login/default_login.php simply remove it.

A link to registration form login popus can be changed in /layout/blocks/tools/login.php:

Code: Select all
                                        <?php if($userID == 0) : ?>
                                        <a class="button" href="<?php echo $this->API->URLbase(); ?>index.php?option=com_users&amp;view=registration"><?php echo JText::_('TPL_GK_LANG_REGISTER_POPUP'); ?></a>
                                        <?php endif; ?>


Thank you!
User avatar
Junior Boarder

teitbite
Mon Mar 20, 2017 1:58 pm
Hi

Go to file /html/com_user/login/default_login.php. This part is responsive for registration (ending code of this file):

Code: Select all
<div class="login_register_col registration<?php echo $this->pageclass_sfx?>">
   <form id="member-registration" action="<?php echo JRoute::_('index.php?option=com_users&task=registration.register'); ?>" method="post" class="form-validate" enctype="multipart/form-data">
   <?php foreach ($regform->getFieldsets() as $fieldset): // Iterate through the form fieldsets and display each one.?>
      <?php $fields = $regform->getFieldset($fieldset->name);?>
      <?php if (count($fields)):?>
      <fieldset>
         <dl>
      <?php foreach($fields as $field):// Iterate through the fields in the set and display them.?>
         <?php if ($field->hidden):// If the field is hidden, just display the input.?>
            <?php echo $field->input;?>
         <?php elseif($field->type != 'Spacer') : ?>
            <dt>
            <?php echo $field->label; ?>
            <?php if (!$field->required && $field->type != 'Spacer'): ?>
               <span class="optional"><?php echo JText::_('COM_USERS_OPTIONAL');?></span>
            <?php endif; ?>
            </dt>
            <dd><?php echo $field->input;?></dd>
         <?php endif;?>
      <?php endforeach;?>
         </dl>
      </fieldset>
      <?php endif;?>
   <?php endforeach;?>
      <div>
         <button type="submit" class="validate"><?php echo JText::_('JREGISTER');?></button>
         <?php echo JText::_('COM_USERS_OR');?>
         <a href="<?php echo JRoute::_('');?>" title="<?php echo JText::_('JCANCEL');?>"><?php echo JText::_('JCANCEL');?></a>
         <input type="hidden" name="option" value="com_users" />
         <input type="hidden" name="task" value="registration.register" />
         <?php echo JHtml::_('form.token');?>
      </div>
   </form>
</div>


You can just delete it.

To get rid of registration button from popup please edit file /layout/blocks/tools/login.php and remove code:

Code: Select all
<?php if($userID == 0) : ?>
<a class="button" href="<?php echo $this->API->URLbase(); ?>index.php?option=com_users&amp;view=registration"><?php echo JText::_('TPL_GK_LANG_REGISTER_POPUP'); ?></a>
<?php endif; ?>
User avatar
Moderator


cron
Remember me
Register New Account
If you are old Gavick user, click HERE for steps to retrieve your account.