Notice

The forum is in read only mode.

Support Forum

Welcome! Support Forums have been reactivated
Welcome the Technical Support section. Help us in assisting you by providing us with a concise and descriptive elaboration of your issues. Be specific and if possible, provide us with a step-by-step instruction in replicating your problem.

Login Redirect.

6 years 8 months ago
  • Ben's Avatar
    Topic Author
  • Ben
  • Offline
  • Fresh Boarder
  • Posts: 2
  • Thank you received: 0
Licenses:
JomSocial Active

I have just upgraded to Pro. When a user logs in they are directed to their profile page. I would like them directed to the home feed but I can't see how to do this. I have tried Jomsocial Redirect but when I use this, a green message appears which reads 'Login Successful' which I definitely do not want.

Hope you can help.

6 years 8 months ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

Hi Ben,

Would you mind provide me backend and FTP access, please? I will give you the solution for it :)

thank you!

6 years 8 months ago
  • Ben's Avatar
    Topic Author
  • Ben
  • Offline
  • Fresh Boarder
  • Posts: 2
  • Thank you received: 0
Licenses:
JomSocial Active

Thanks for your reply. Ive found a work around. Ive just used the Joomla module.

6 years 8 months ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

you're welcome, glad to know that :)

6 years 8 months ago
Licenses:
JomSocial Active

Can you implement new switch in JomSocial Redirect plugin that can disable welcome message on successful login, because erasing message in settings just restores default message string. Since successful login results in drastic change of what user is presented with, message that confirms that is unnecessary.
1) Add new choice to jomsocialredirect.xml line 30:
<field name="redirect_login_msg_display" type="radio" default="1" label="Display welcome message on successful" login="">
<option value="0">No</option>
<option value="1">Yes</option>
</field>
2) Change line 88 to 90 on jomsocialredirect.php from:
88> if(count($mainframe->getMessageQueue()) == 0){
89> $mainframe->redirect($link, JText::_($this->params->get('redirect_login_msg', 'LOGIN_SUCCESSFUL')), 'message');
90> }
to look like this:
88> if(count($mainframe->getMessageQueue()) == 0){
89> if ($this->params->get('redirect_login_msg_display')){
90> $mainframe->redirect($link, JText::_($this->params->get('redirect_login_msg', 'LOGIN_SUCCESSFUL')), 'message');
91> } else {
92> $mainframe->redirect($link); } }

6 years 8 months ago
Licenses:
JomSocial Expired

Hi Vladimir,

Thanks for sharing you code. I'm interested to do it because I don't want to show this message to my users when they Login into the site. I'm trying to implement your code but I detected to problems.

1.- First of them is related with:

<field name="redirect_login_msg_display" type="radio" default="1" label="Display welcome message on successful" login="">
<option value="0">No</option>
<option value="1">Yes</option>
</field>


I think " is missing on label param.

The second thing is that when I add following code

if(count($mainframe->getMessageQueue()) == 0 && $this->params->get('redirect_login_msg_display') == 1){

in jomsocialredirect.php and I try to login with some user account it shows the following error message:

Advertencia
El token de seguridad no coincidía. La solicitud se abortó para evitar cualquier violación de seguridad. Vuelve a intentarlo.

That means something like Security token doesnt match. This action was aborted to prevent a security violation. Try again.
Thanks for your support.

6 years 8 months ago
Licenses:
JomSocial Active

Sry for errors in code was typing without testing.
Yes, one " was missing on first edit
I have corrected my previous post with correct code. Here is full code, once more, without line numbers for easier copy/paste:
1) Add new choice to jomsocialredirect.xml like:
<field name="redirect_login_msg_display" type="radio" default="1" label="Display welcome message on successful" login="">
<option value="0">No</option>
<option value="1">Yes</option>
</field>
2) Change line 88 to 90 on jomsocialredirect.php from:
if(count($mainframe->getMessageQueue()) == 0){
$mainframe->redirect($link, JText::_($this->params->get('redirect_login_msg', 'LOGIN_SUCCESSFUL')), 'message');
}
to look like this:
if(count($mainframe->getMessageQueue()) == 0){
if ($this->params->get('redirect_login_msg_display')){
$mainframe->redirect($link, JText::_($this->params->get('redirect_login_msg', 'LOGIN_SUCCESSFUL')), 'message');
} else {
$mainframe->redirect($link); } }

If you need to keep lines in check you can format above code in 3 lines:
if(count($mainframe->getMessageQueue()) == 0){
if ($this->params->get('redirect_login_msg_display')){$mainframe->redirect($link, JText::_($this->params->get('redirect_login_msg', 'LOGIN_SUCCESSFUL')), 'message');
} else {$mainframe->redirect($link); } }

Added new if ... else to check if there should be message for successful login and if so, show message after redirect. If there should be no message, just do redirect.

The following user(s) said Thank You: Gerard
6 years 8 months ago
Licenses:
JomSocial Expired

Hi Vladimir!

Thanks for your sharing! And take note @Dimas to add this in next versions because this is an usefull feature.

Thanks a lot and best regards!

The following user(s) said Thank You: Vladimir
6 years 8 months ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

Thank you for the sharing idea :)

6 years 6 months ago
Licenses:
JomSocial Active

Option for enabling messages on login/logout are implemented in JomSocial 4.4.5 so check JomSocial Redirect plug-in options.

Attachments:
6 years 6 months ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

yeah right, we already implemented it on latest version

Moderators: Piotr Garasiński
Powered by Kunena Forum

Join 180,000 websites creating Amazing communities

JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a
full -fledged, social networking site

TRY NOW BUY NOW