Форуми / Cotonti / Support / A Couple Qustions

jwmass03
#1 08.05.2009 01:03
Well, I too Lombi's advice and upgraded to Cotonti.

I still have a couple of questions though. With Cotonti, it does tell the user that the admin will have to approve before they can log in when they register, however, I can't find where to approve them as the admin. Most likely I'm just over-looking something obvious.

My other question still persists. Does anyone know of a way to make it so that if the user is not logged in, the only thing he can see is a log-in screen?

Thanks,
Jeff
Lombi
#2 08.05.2009 01:05
2.) Yes, you just turn maintenance mode on. It's in admin/config/main if i remember correctly.

1.) Although I've never used that function I would presume it's on the front page of the admin, on the same exact location where the pages are waiting for validation.
<a href="http://www.domenlo.com">Surreal Art</a>
jwmass03
#3 08.05.2009 01:25
Well, the maintenance mode works for the most part, but then the registration page is not accessable either.

As far as the User approval goes, when a page is put up, it is put under ADMINISTRATION PANEL / PAGE / WAITING FOR VALIDATION, and even shows up at the top like so:

Administration | Users | Profile | My files | No private messages
In validation queues : 1 Page

However, nothing shows up for users, and I can't find a page to approve them, or manually change what group the user belongs to.

Thanks for your response.
pieter
#4 08.05.2009 01:41
User approval:

I tested it on my test site:
Admin gets an email.
So this mean only admin with ID=1

Hi,
You are receiving this email because USERNAME requested a new account.
This user won't be able to login until you manually set the account as 'active', here :

 http://www.YOURSITE.com/users.php?gm=2&s=regdate&w=desc


------------------------------
Maybe a good idea to make it like pages. In validation queue. Because if there are multiple admins anly admin with ID=1 will get the mail.



.
... can we help you ...

Відредаговано: pieter (08.05.2009 01:55, 15 років тому)
Kilandor
#5 08.05.2009 01:56
To apporve all you do is goto their profile, click edit, and change them from inactive to member.
jwmass03
#6 08.05.2009 01:57
Alright, I guess this is what I was looking for, although the link simply takes me to the list of Inactive users, and I have to manually go in and change each one's group.

Thanks
pieter
#7 08.05.2009 01:59
Kilander, can it be made like pages? Is a nice feature I guess if more then one admin.
... can we help you ...
Kilandor
#8 08.05.2009 02:04
Well I suppose if popular demand would like it we could Create a whole special area for that. Though you can easily view inactives also by looking at (ex. http://www.cotonti.com/users.php?gm=2 ). Which I think in most cases any large sites would never use such system, sense it would be very time consuming. So its prob no more hassle to have to open the profile and edit it.
pieter
#9 08.05.2009 02:09
Propably you are right.

For me the best methode is using email activation.
... can we help you ...
jwmass03
#10 08.05.2009 03:06
Well I've been messing around with maintenance mode, and I've been able to remove the message that is given while in maintenance mode but users are still not able to register.

I was wondering if anyone here knows where it redirects to the login page if maintenance mode is on, and if it'd be possible to ignore the case of when the user is trying to go to the registration page?

Thanks.
Kilandor
#11 08.05.2009 05:12
The redirect is located in common.php starting on line 299

However in users.php you could change
if(isset($_GET['m']) && $_GET['m'] == 'auth')
{
	define('SED_AUTH', TRUE);
}

To

if(isset($_GET['m']) && ($_GET['m'] == 'auth' || $_GET['m'] == 'register'))
{
	define('SED_AUTH', TRUE);
}

This would allow the registration page to work.
jwmass03
#12 08.05.2009 07:19
Thanks, that works great.

One last thing, to get the message saying that the admin must approve of the user, but not any of the other messages, like when the user clicks on a screen that's not allowed for them, how could I do that?

I tried

if(isset($_GET['m']) && ($_GET['m'] == 'auth' || $_GET['m'] == 'register' || $_GET['msg'] == '118'))
{
define('SED_AUTH', TRUE);
}

But I think maybe there's a page that it loads between clicking "Submit" and getting to that message, because that didn't work.

Thanks,
Jeff
Kilandor
#13 08.05.2009 07:48
well you would be almost correct

See it redirects you to message.php

So if you took the above code and put it in message.php similar to user.php it would work however you don't need all that if all you would need is this...

if($_GET['msg'] == 118)
{
	define('SED_AUTH', TRUE);
}
That should work, just a note, you don't have to quote numbers :) if thats all there is in it ex 118, but strings have to be quoted ex '118b' Just a small tip though in most cases it wouldn't ever make a difference.
jwmass03
#14 08.05.2009 20:04
Well, I spoke a little too soon. Everything works up through the user registering. But, once the user is registered and logged in, the only thing they are able to get to is still the login page.

How could I go about changing the lower limit of the authorization level to allow regular member to still use the site, without having to make them moderators?

Thanks,
Jeff

Well in case anyone comes across this topic, and wants to know how to do it. You'll have to manually change the database.

Under the table sed_groups, you'll have to edit the property of the members. There's a property called grp_maintenance that must be set to 1.

I think the command would be
UPDATE sed_groups SET grp_maintenance = '1' WHERE grp_alias = 'members';

Відредаговано: jwmass03 (09.05.2009 23:46, 15 років тому)
Kilandor
#15 10.05.2009 00:58
You can do this in the Admin > Users > Options for the group you want