We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

permissions settings for captcha | Forum

dave Leader
dave May 9 '13

I want to wrap the captcha display on the bottom of the new member registration so that it is not affected by choosing NO option on the admin permissions page for guests to view.

 

If you choose guests cannot view, then the registration shows fine so they can try to register, but the captcha does not show so they cant.

 

So what i want to do is find the captcha code and secure it on the same permission level as the registration so that it shows.

 

Thanks..

 

so far in my search i have found the start of my trail lol.... i found the  ow_system_plugins/admin/controller/permissions.php

 

and in that file i found

 

$guestsCanView = new RadioField('guests_can_view');
        $guestsCanView->addOptions(array('1' => $language->text('admin', 'permissions_index_yes'), '2' => $language->text('admin', 'permissions_index_no'), '3' => $language->text('admin', 'permissions_index_with_password')));
        $guestsCanView->setLabel($language->text('admin', 'permissions_index_guests_can_view_site'));
        $guestsCanView->setDescription($language->text('admin', 'permissions_idex_if_not_yes_will_override_settings'));
        $form->addElement($guestsCanView);

 

 

ok so now when i get to the captcha file i need to be able to trap this

 

'2' => $language->text('admin', 'permissions_index_no'),   and see if it is in fact 2,  if so then let them in anyway...   we only want to stop them with password, so i guess i will need to trap for the password option as well.

 

thanks

dave Leader
dave May 9 '13
Actually i think this whole deal might be on the ow side not the plugin side
dave Leader
dave May 10 '13

Now im not sure, the default captcha works fine with the permission set to no, but the question captcha does not, but yet there is nothing about permissions or config guests_can_view on the plugin side.

 

So im confused on this one as to if it is the plugin issue  or the core issue

The Forum post is edited by dave May 10 '13
dave Leader
dave May 11 '13

i though i had it but nope..

 

tell me this, from a plugin how do i set the user as authenticated and pass that value to core application php file..

The Forum post is edited by dave May 11 '13
Daisy Team
Daisy May 15 '13
You should create a new API using the following authentication string:

OW_Auth::getInstance()->login($userId);
dave Leader
dave May 15 '13
thanks Daisy, ill give that a try.. :)