Force complete profile

1 year 5 months ago #331708 by ialearn
Force complete profile was created by ialearn
Hi
I am using auto actions, to redirect a user to their profile page if required fields are empty, which I setup to trigger on login, this is working. The problem now is that after they have been redirected they can simply click on another link if they choose without completing their required profile fields.
From what I could find on the forum it seems like implementing a site wide block, until profile fields are completed is very difficult to implement, is it possible to restrict access to a specific page until required fields are completed or to simply keep redirecting the user to their profile page until they complete required fields.

Please Log in to join the conversation.

1 year 5 months ago #331716 by krileon
Replied by krileon on topic Force complete profile
We do not provide a means of locking a user into their profile. There's too much risk of getting stuck in an infinite loop. You'd have to try and do this using CB Auto Actions, but again comes with risk. I would just lock them out of whatever feature those fields are required for until they complete those fields and avoid forcing them to stay on profile edit.


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 to join the conversation.

1 year 5 months ago #331730 by ialearn
Replied by ialearn on topic Force complete profile

We do not provide a means of locking a user into their profile. There's too much risk of getting stuck in an infinite loop. You'd have to try and do this using CB Auto Actions, but again comes with risk. I would just lock them out of whatever feature those fields are required for until they complete those fields and avoid forcing them to stay on profile edit.

How do I get this working using AutoActions, I will admit I don't really get how this is risky, EasyProfile had this as a standard feature, it should not be that difficult for CB to check "are all required fields completed" if yes allow access, if no redirect to edit page.

Also in CB is it possible to set a field as required, but on the front end only, I don't want a situation where an admin can't update one field via the back end because the other required fields have not been completed.

Please Log in to join the conversation.

1 year 5 months ago #331741 by krileon
Replied by krileon on topic Force complete profile

How do I get this working using AutoActions, I will admit I don't really get how this is risky, EasyProfile had this as a standard feature, it should not be that difficult for CB to check "are all required fields completed" if yes allow access, if no redirect to edit page.

It will directly conflict with Joomla's MFA if in use and Joomla's reset password if in use. If the redirect is not done carefully it could result in an infinite loop of them constantly sent back to profile edit. I didn't say it wasn't doable, but that there's risks. To do this from CB Auto Actions you'd likely need to create a redirect action on the onAfterRender trigger. Example as follows.

Global
Triggers: onAfterRender
Type: Redirect
User: Self
Access: All Registered Users
Conditions
Field: Custom Value
Custom Value: [cb:if application_context="frontend"]ENABLED[/cb:if]
Operator: Equal To
Value: ENABLED
Action
URL: [cb:url location="profile_edit" /]

The condition ensures this only applies to frontend. Now add extra conditions to check if their profile is completed or not. If your conditions are met it should send them back to profile edit. I'm unsure if this will interrupt the save process. If it does some additional conditions will likely need to be added to prevent that.

Also in CB is it possible to set a field as required, but on the front end only, I don't want a situation where an admin can't update one field via the back end because the other required fields have not been completed.

Within CB > Configuration > User Profile set "Fields Validation in User Management" to "No" and you'll be exempt from most validation checks in backend profile edit.


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 to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.197 seconds

Facebook Twitter LinkedIn