Role access, log system and form in to an wordpress page

Hello,
I have already sent these questions to the How To team for the video meeting. If I can’t be helped there, I’ll do it again here.

I have the following questions: (I use a wamp server)

1. How can I forward the user to your area after logging in.
And only show them their own content.
I have 4 user groups (role)

  • Admin
  • Clients
  • Freelancers
  • Locations

    Of course, they should not have access to the content of other users.
    Only admins can access all content.

For the login process I followed this tutorial:

Here Brian works with two tables for users and roles.

In this tutorial on the subject of “restricted access” just one user table inc. role is in use.

I followed this tutorial for the redirection.

To get the role I use an innerjoin


I try with or without an alias.

Unfortunately that doesn’t work.
I am always redirected to the client page.

My forwarding
loginform.data.userdetails[0].user_role==‘a’?‘admin/index.php’:‘clients/index.php’
Whether I use “a” or “admin” doesn’t matter.

And only two possible roles are processed here, but I need 4 roles.

2. I need a solution for a log system.
All changes should be recorded here.
Example:
[User] on [date - time] changed billing address from [original content] to [new content].

How can i implement that?

3. And maybe you can help me here too.
I run a Wordpress site: www.cg-events.de
Here I would like to write directly into my project table with the contact forms.
How can I use Wappler forms in Wordpress?

Best regards
Chris

Hi

As discussed I’m the meeting I will deal with question one tomorrow.

Question 2, I dont understand what you mean, you mean an audit trail?
Question 3 cannot realistically be answered based on the information as different Wordpress contact form plugins work in different ways.

Hello Brian,

First of all, thank you very much for the informative meeting.
I found a solution for question 1.

But I’m still confused with my first question.

I need a solution that looks something like this:
if ‘role’ is a
{redirect to /admin/}
elseif ‘role’ is c
{redirect to /clients/}
elseif ‘role’ is f
{redirect to /freelancer/}
else
{redirect to /locations/}

And also very important.
How do I ensure that each user only has access to the content intended for him

how can i do this?

For question 3 I thought to use a form created with Wappler in Wordpress.

Before I go through it, how do you want to handle situations where a user has more than one role or will that never happen?

No, that wouldn’t happen, each user only has one role.

But I’ve thought about simply creating separate login procedures for the respective folders. That’s probably easier.

But how can I ensure that each user only has access to their own content?

Sorry, had a bit of a disastrous day today.
I will try to get a video put together tonight covering logins with different roles, routing based on the role and securing areas based of permissions.
If not, first thing tomorrow AM
Sorry about delay

Hopefully this should answer your enquiry re login, redirection and security

There are so many variables on this one that it is difficult to even start to answer.
basically you will have to create a second db connection to connect wappler to the WordPress database and then insert the data into the table.

The menu links will be the issue as you will have to custom link to the wappler page and then return back to a specified WordPress page on success. To be honest it is going to be really messy.

the video is perfect, thanks!

1 Like

I know this a bit off topic but why not use JetEngine and JetFormBuilder if you want to use Wordpress?

Is your end goal to move everything to Wappler?

Always think of integrating Wappler with Wordpress as like asking how to fit a Tuk Tuk engine into a Ferrari. Why would you want to???
Do it all in Wappler!!!

1 Like

That is where I was going Brian, I can’t see using both systems. I will admit there are times that I think I could use Wordpress for the application I am building but I know using Wappler will get me better long term results.

But we have a wordpress site with about 1200 landing pages online. The move would take forever.
In addition, I still lack the knowledge on many topics with wappler.

Unfortunately this would be a project, not just a simple but of advice. There are issues relating to the nature of the plugin currently in use leading to the data structure used, security considerations at both app and server level then the menu and response integration with wordpress. It would need a detailed analysis of your current setup.