Topic: Account plugin
Discuss the Account plugin here...
Please always check the Support forums and Wiki before asking. (My Ohloh account.)
Like Wolf CMS? Consider making a financial contribution.
You are not logged in. Please login or register.
Discuss the Account plugin here...
How to redirect registered users without permissions, from admin to account page?
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.
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)
@irgordon - Sounds more like you want the Registered Users plugin... ![]()
Does that plug in work with the latest version of Wolf CMS 0.6.0?
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.
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.
@DS4 Is this with the Wolf CMS stable (0.6.0) download or a nightly (development) download?
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)
*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.
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
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.
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
Only AccountController.php I believe. ![]()
Edit: public download on my site updated.
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.
Well, my first response would be... what exactly did you change?
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();
}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 552 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! ![]()
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!
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. ![]()
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!
Delighted to hear it! ![]()
(And I'm sure you'll get some help with the substantive questions soon!)
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')) {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. ![]()
@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! ![]()
@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! ![]()
Downloaded latest version (account_008.zip) and in Administration it says version 0.7 and next to it Latest version reads 0.8.
Why?
Could be a typo in plugins info field. Is it working?
Posts [ 1 to 25 of 32 ]