Skip to Content Skip to Menu

Redirect on conditions

  • chanteur94
  • chanteur94
  • OFFLINE
  • Posts: 302
  • Thanks: 13
  • Karma: 1
9 years 9 months ago - 9 years 9 months ago #257874 by chanteur94
Redirect on conditions was created by chanteur94
Hi
Here are my problems (probably CB Auto actions can save me but I have no notice)

1 - I would like to test before the user open a new instance of the website (on the same computer or another), if he is already logged : if yes, i would like redirect him to a specific link. If no, nothing happens


2 - Now I have my two instances open by the same user. If he logout from one instance, the other instance is also deconnected and redirected to another link (/www/.../component/users/?view=login. I would change this link.

3 - But if i reconnect from the opened instance (/www/.../component/users/?view=login), i have another redirection to /www/.../component/users/profile, i don't know why. So, i want to change this redirection too !!!

4 - There is a 'before user first login'...there isn't 'after user first login' ?


I hope that my request is clear.

Thank you.
Best regards.
Last edit: 9 years 9 months ago by chanteur94.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48479
  • Thanks: 8283
  • Karma: 1443
9 years 9 months ago #257907 by krileon
Replied by krileon on topic Redirect on conditions

1 - I would like to test before the user open a new instance of the website (on the same computer or another), if he is already logged : if yes, i would like redirect him to a specific link. If no, nothing happens

CB AntiSpam can block double logins. If you're wanting this for security purposes I recommend just using CB AntiSpam.

The alternative is creating a CB Query Field that queries Joomlas _session table to see how many sessions the user has and in a Redirect action check if it's greater than 1. This won't work on loading of your site as that's not what CB Auto Actions does. CB Auto Actions performs actions on CB triggers. So you could do this check on the after login trigger for example.

2 - Now I have my two instances open by the same user. If he logout from one instance, the other instance is also deconnected and redirected to another link (/www/.../component/users/?view=login. I would change this link.

I don't think you can do this. I'm pretty sure on logout all the users sessions are removed. So there's no information to go on as to who is who anymore. They should both be logged out (one of them on their next page load) since their sessions are now gone.

3 - But if i reconnect from the opened instance (/www/.../component/users/?view=login), i have another redirection to /www/.../component/users/profile, i don't know why. So, i want to change this redirection too !!!

I'm guessing you set the login redirect url within your CB Login module.

4 - There is a 'before user first login'...there isn't 'after user first login' ?

Nope, there isn't. First login only takes place if the user has never logged in before.

I'm not sure I understand the issue you're trying to control. From a security standpoint it seams like you just want to stop duplicate logins, which CB AntiSpam has a built in feature to stop.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • chanteur94
  • chanteur94
  • OFFLINE
  • Posts: 302
  • Thanks: 13
  • Karma: 1
9 years 9 months ago #257927 by chanteur94
Replied by chanteur94 on topic Redirect on conditions
Effectively it seems something that CB Antispam can do.
So, I install CB Antispam. Sharing and autoblocks works but not duplicates. I try all blocks methods.
My problem is bigger that I think.

1 - where to redirect users who wants to connect in a restricted area ? (only registered members for exemple)

2 - When I'm already connected and I try to connect with the same IP and the same browser, i haven't the opportunity to put my login/password. I'm automaticly redirected to index.php page. I don't want that. I would like reditected to the Login Redirection URL of my CB Login.

3 - If i open my session with other browser, I put my login/password : if I'm already connected with this login/password from another browser, it occurs the same than 2 (I'm automaticly redirected to index.php page)


It's enough for the moment because other problems occurs when I disconnect one session...

Hope i'm clear..

Thank you

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48479
  • Thanks: 8283
  • Karma: 1443
9 years 9 months ago #257985 by krileon
Replied by krileon on topic Redirect on conditions
To auto block duplicate logins you need to navigate to CB > Plugin Management > CB AntiSpam > Parameters > Login > Duplicates. Set "Block" to "Enable" then adjust further as needed. I recommend by default just denying the login.

The duplicate login feature works by counting a users sessions. If they have more sessions than the number allowed it blocks the login. This feature is ignored for CB moderators as is mot of the blocking features (the descriptions tell you this). This feature is also ignored for whitelisted users.

To trigger it login with a registered user on 1 browser. Now login with the same user on a separate browser. The login should be blocked as it should generate 2 Joomla sessions.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • chanteur94
  • chanteur94
  • OFFLINE
  • Posts: 302
  • Thanks: 13
  • Karma: 1
9 years 9 months ago - 9 years 9 months ago #258028 by chanteur94
Replied by chanteur94 on topic Redirect on conditions
How to prevent the fact that a user can close a Windows without disconnecting ?

(It occurs the user sessions seems always open and the other browser can't login with the same login).

PS : 1 - where to redirect users who wants to connect in a restricted area ? no idea ?
PS : it seems sometimes that it is the Joomla login who works instead CB Login. I think that i have dispublish or delete all Joomla login. Where do I forget something. In some threads, they speak about .htaccess ....


Tx
Last edit: 9 years 9 months ago by chanteur94.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48479
  • Thanks: 8283
  • Karma: 1443
9 years 9 months ago - 9 years 9 months ago #258101 by krileon
Replied by krileon on topic Redirect on conditions

How to prevent the fact that a user can close a Windows without disconnecting ?

You can't unless you've some sort of JS hook that waits for their window to close then fires off some sort of ajax to log them out. We've nothing of the sort though and it doesn't seam necessary. Just shorten their session time if you don't want them online for too long, which can be done within Joomla global configuration.

PS : 1 - where to redirect users who wants to connect in a restricted area ? no idea ?

You can't change this. That's standard Joomla behavior.

PS : it seems sometimes that it is the Joomla login who works instead CB Login. I think that i have dispublish or delete all Joomla login. Where do I forget something. In some threads, they speak about .htaccess ....

CB AntiSpam can not block Joomla login. CB AntiSpam acts on CB triggers. Shut off Joomla login (unpublish all frontend Joomla login modules) and ensure our system plugin is installed and enable to stop access to Joomla user component.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
Last edit: 9 years 9 months ago by krileon.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum