XF 2.2 How to disable access to /index.php?account/ pages?

BubbaLovesCheese

Active member
Is there a way to prevent all users from accessing their account page?

I would like to block or redirect everything away from this URL

/index.php?account/*

Thanks!
 
Solution
Summary:

If anyone wants to hide elements from the right side tab, then insert this code in to the extra.less template.

CSS:
/* Hides elements from the right side navigation tabs */

.p-nav-opposite                          // shows : nothing
// .p-account                            // shows : only search
// .p-navgroup-link.badgeContainer       // shows : icon, username, and search
// .p-navgroup-link--user                // shows : conversations, alerts, and search

{
    display: none;
}

It's currently set to "show : nothing", but just comment off whichever group you prefer not to use.
They wouldn't.

The forum is just an extension of my main website. Login is automatic using Single Sign On with OAuth.

I need to disable their ability to change emails, passwords, avatars, usernames, titles, email preferences, etc....
 
Okay, I guess another option would be to hide the entire right side element.

Is there a place where I could insert this code to hide the element?

And is this code even correct?

Thanks.

Code:
.p-nav-opposite .element.style

{
    display: none;
    visibility: hidden;
}
 
extra.less template

Thanks. That worked.

What do you want to hide exactly ?
With this code Conversations, Alerts and Search will not be displayed too...

Actually the code did not work, I had to change it from .p-nav-opposite .element.style to just .p-nav-opposite to hide everything on the right side nav..

But yes, the goal is to prevent access to everything in the account section.

In the end I settled on .p-account which just hides the account section, and leaves the search. Which is even better.

With this option, if a user know the path he can access to the page

True. I can handle 1 random person messing up their account via a direct link. But I'm very sure 99% will not even know to try.

Private conversations are currently done through the main website, so that feature is a bit redundant.

Eventually I reinstate it, but I'll introduce new features like conversation slowly, if I feel like people would like it. But it's not needed now. And keeping people from changing their email and passwords and avatars is the most important thing to stop.

Thanks everyone!
 
Summary:

If anyone wants to hide elements from the right side tab, then insert this code in to the extra.less template.

CSS:
/* Hides elements from the right side navigation tabs */

.p-nav-opposite                          // shows : nothing
// .p-account                            // shows : only search
// .p-navgroup-link.badgeContainer       // shows : icon, username, and search
// .p-navgroup-link--user                // shows : conversations, alerts, and search

{
    display: none;
}

It's currently set to "show : nothing", but just comment off whichever group you prefer not to use.
 
Solution
Top Bottom