1

Topic: Account plugin

Discuss the Account plugin here...

Wolf CMS founder and lead developer
Please always check the Support forums and Wiki before asking. (My Ohloh account.)
Like Wolf CMS? Consider making a financial contribution or see our financial report first.

2

Re: Account plugin

How to redirect registered users without permissions, from admin to account page?

Thumbs up

3

Re: Account plugin

sartas wrote:

How to redirect registered users without permissions, from admin to account page?

So the situation you're in is:

- User is registered but does not have any roles.
- User tried to go to admin backend and gets redirected to front page.

And now you want to redirect the user not to the front page but to the user's "My Account" page. Correct?

If so, its not really a question about the account plugin. The redirect to the front page is currently done in the backend.php file of the core. Near the top of that file it contains the following code:

// Redirect to front page if user doesn't have appropriate roles.
if (!AuthUser::hasPermission('administrator,developer,editor')) {
    header('Location: '.URL_PUBLIC.' ');
    exit();
}

If you want to redirect to the account page instead of the frontpage, just update the header() line to point to the correct url. (depends on what you entered in the settings screen)

Putting the redirect here is not the best solution and we'll probably change it to something nicer in the future, but for now this is it.

Wolf CMS founder and lead developer
Please always check the Support forums and Wiki before asking. (My Ohloh account.)
Like Wolf CMS? Consider making a financial contribution or see our financial report first.

4

Re: Account plugin

Thanks, it's what i need.

Thumbs up

5

Re: Account plugin

Two suggestions for improvement: more roboust User Roles (Groups) allow per item access, so if they can access a page but, can't download a file because they aren't in X Group.

Also, you should allow custom fields so you can request more information from users on the registration process, allow a toggle checkbox to determine whether required for registration or remains optional.

Lastly, you should have the ability to moderate users, so they have to be approved before being allowed to access their My Account page.

Last edited by irgordon (2010-08-14 17:58)

Thumbs up

6

Re: Account plugin

@irgordon - Sounds more like you want the Registered Users plugin... smile

Wolf CMS founder and lead developer
Please always check the Support forums and Wiki before asking. (My Ohloh account.)
Like Wolf CMS? Consider making a financial contribution or see our financial report first.

7

Re: Account plugin

Does that plug in work with the latest version of Wolf CMS 0.6.0?

Thumbs up

8

Re: Account plugin

As far as I know it works fine with the Wolf CMS stable download.

If not, let me know here. Though I'm not the author, I am quite familiar with it and will be able to fix any potential problems.

Wolf CMS founder and lead developer
Please always check the Support forums and Wiki before asking. (My Ohloh account.)
Like Wolf CMS? Consider making a financial contribution or see our financial report first.

9

Re: Account plugin

I'm encountering a problem with the implementation of the Registered Users plugin.

The problem occurs If you're NOT using clean url's (at least that's the case for me)

The login form links to an non existing page /login/login

In order to make it work I had to alter the code in RegisteredUsers.php on line 48

I changed:

echo '<form action="'.URL_PUBLIC.' '.ADMIN_DIR.'/login/login"method="post">;

to

echo '<form action="'.URL_PUBLIC.' '.ADMIN_DIR.'/?/login/login"method="post">;


(added /? infront of /login/login)

I seems to work with this fix.

Thumbs up

10

Re: Account plugin

@DS4 Is this with the Wolf CMS stable (0.6.0) download or a nightly (development) download?

Wolf CMS founder and lead developer
Please always check the Support forums and Wiki before asking. (My Ohloh account.)
Like Wolf CMS? Consider making a financial contribution or see our financial report first.

11

Re: Account plugin

0.6.0 stable

*EDIT*

tested with the nightly and it has the same problem. only the code fix does not seem to work here

Last edited by DS4 (2010-08-15 20:01)

Thumbs up

12

Re: Account plugin

DS4 wrote:

*EDIT*

tested with the nightly and it has the same problem. only the code fix does not seem to work here

That's logical since its a problem in the Registered Users plugin. I'll see if the original author can't fix it. (though he's been conspicuously off-line)

NOTE: Please continue to discuss the Registered Users plugin at this forum topic instead of here.

Wolf CMS founder and lead developer
Please always check the Support forums and Wiki before asking. (My Ohloh account.)
Like Wolf CMS? Consider making a financial contribution or see our financial report first.

13

Re: Account plugin

Hi all

I have recently installed the Account plugin to allow user to edit their account etc - the main account page works fine however the edit and password pages simply return a blank page.  Does anyone know why this might be?

thanks in advance,

Josh

Thumbs up

14

Re: Account plugin

Josh, try this one...

Someone else had a similar problem and only reported back today. I'll update the download today if this works for you.

Wolf CMS founder and lead developer
Please always check the Support forums and Wiki before asking. (My Ohloh account.)
Like Wolf CMS? Consider making a financial contribution or see our financial report first.

15

Re: Account plugin

Thanks! that seems to have solved the problem.

May I asked which files you changed? I had made some slight changes to some of the files to fit in with look and feel etc - would be useful to just replace the changed files rather than everything.

Thanks again,

Josh

Thumbs up

16

Re: Account plugin

Only AccountController.php I believe. smile

Edit: public download on my site updated.

Wolf CMS founder and lead developer
Please always check the Support forums and Wiki before asking. (My Ohloh account.)
Like Wolf CMS? Consider making a financial contribution or see our financial report first.

17

Re: Account plugin

mvdkleijn wrote:
sartas wrote:

How to redirect registered users without permissions, from admin to account page?

So the situation you're in is:

- User is registered but does not have any roles.
- User tried to go to admin backend and gets redirected to front page.

And now you want to redirect the user not to the front page but to the user's "My Account" page. Correct?

If so, its not really a question about the account plugin. The redirect to the front page is currently done in the backend.php file of the core. Near the top of that file it contains the following code:

// Redirect to front page if user doesn't have appropriate roles.
if (!AuthUser::hasPermission('administrator,developer,editor')) {
    header('Location: '.URL_PUBLIC.' ');
    exit();
}

If you want to redirect to the account page instead of the frontpage, just update the header() line to point to the correct url. (depends on what you entered in the settings screen)

Putting the redirect here is not the best solution and we'll probably change it to something nicer in the future, but for now this is it.

When I changed this it made all my admin pages go blank.

Thumbs up

18

Re: Account plugin

Well, my first response would be... what exactly did you change? smile Without that information it's difficult to know what went wrong. Also handy to know... what version of Wolf are you using?

In Wolf CMS 0.7.0 RC1, this should work fine:

// Redirect to front page if user doesn't have appropriate roles.
if (!AuthUser::hasPermission('admin_view')) {
    header('Location: '.URL_PUBLIC.' ');
    exit();
}
Wolf CMS founder and lead developer
Please always check the Support forums and Wiki before asking. (My Ohloh account.)
Like Wolf CMS? Consider making a financial contribution or see our financial report first.

19

Re: Account plugin

Currently gives errors when enabling themed account page in 7.3 stable:

Strict Standards: Non-static method Page::partExists() should not be called statically, assuming $this from incompatible context in /home/davidk02/www/www.patuxentaza.com/wolf/app/controllers/PluginController.php on line 55

Strict Standards: Non-static method Page::includeSnippet() should not be called statically, assuming $this from incompatible context in /home/davidk02/www/www.patuxentaza.com/wolf/app/controllers/PluginController.php on line 55

Thumbs up

20

Re: Account plugin

2 Problems with Account plugin.

The plugin is working, the account page will come up when addressed directly, but when I try to click on Settings it says:

Not allowed
Are you sure you are logged in?

Problem two may just be a typo...  I am showing that 0.0.8 is available and my version is 0.0.7  I have downloaded it both from the repository and vanderkleijn.net (0.0.8 link) and installed each and it still shows the older version.

Off-Topic:  Is there a way to be emailed when someone responds to our forum posts?

BTW:  This is on a Client's website and I just upgraded from 0.7.3 to 0.7.5 following the Update.txt and it went beautifully, the site was only offline for 15 minutes!  Great job Wolf Team, you guys ROCK! smile

Linux Version       2.6.18-238.9.1
Apache Version  1.3.37
PHP Version        5.2.17
MYSQL Version  5.1.49
Wolf  Version       0.7.5
Wolf Path:  mydomain.com ---> CMS_Root ---> Wolf
Wolf Plugins:  All core + Dashboard, Form Builder,
Fancy Image Gallery, Notes, Account, Registered Users

Thanks in advance for all your help!

Thumbs up

21

Re: Account plugin

sully wrote:

Off-Topic:  Is there a way to be emailed when someone responds to our forum posts?

In the black bar above post #1, at the right end, you can use the "RSS Topic Feed" to get notifications of posts in this thread. I think that's the best punBB can do. hmm

sully wrote:

BTW:  This is on a Client's website and I just upgraded from 0.7.3 to 0.7.5 following the Update.txt and it went beautifully, the site was only offline for 15 minutes!  Great job Wolf Team, you guys ROCK! smile

Delighted to hear it! big_smile

(And I'm sure you'll get some help with the substantive questions soon!)

Using Wolf CMS professionally and for profit? Please consider supporting Wolf financially. Thanks!

22

Re: Account plugin

sully wrote:

The plugin is working, the account page will come up when addressed directly, but when I try to click on Settings it says:

Not allowed
Are you sure you are logged in?

Whoops... forgot to update a check for the new permissions system. Make the following changes (should be line 259) in AccountController.php

// Change this....
if (!AuthUser::hasPermission('administrator')) {

// Into this...
if (!AuthUser::hasPermission('admin_edit')) {
sully wrote:

Problem two may just be a typo...  I am showing that 0.0.8 is available and my version is 0.0.7

Typo... version 0.5.0 will be out soon anyway. smile

Wolf CMS founder and lead developer
Please always check the Support forums and Wiki before asking. (My Ohloh account.)
Like Wolf CMS? Consider making a financial contribution or see our financial report first.

23

Re: Account plugin

@David -  Thanks for the forum tip!  I have another client to upgrade next week, I hope it goes as well and I don't need to post unless I am boasting another great success! smile

@Martijn - Worked like a charm.  Everything is well again...  A typo, and I thought my number keys were the only ones that kept moving on my keyboard.  Looking forward to 0.5.0.  Thank you VERY much, that page looks so much better with the site's custom layout! smile

Thumbs up

24

Re: Account plugin

Downloaded latest version (account_008.zip) and in Administration it says version 0.7 and next to it Latest version reads 0.8.
Why?

Thumbs up

25

Re: Account plugin

Could be a typo in plugins info field. Is it working?

Tutorials at Project 79 | Wolf CMS Docs