[solved]FC v2.0 r1290 - Problem after change user language

More
12 years 7 months ago #25011 by Rehne
after i changed the language of the super-user
i get the following error message in the backend
and i can't get even more into the edit mode of the user

Warning: array_keys() [function.array-keys]: The first argument should be an array in C:\xampp\htdocs\Eigene_Webs\__joomla_cms_nettdotkomm_de\cms\plugins\system\flexisystem\flexisystem.php on line 91


in this row:
Code:
$usergroups = array_keys($user->get('Groups'));

Regards

Please Log in or Create an account to join the conversation.

More
12 years 7 months ago #25032 by ggppdk
This is strange for some reason
$user->get('Groups')

is not returning any groups

we could put a check for this,

tried re-saving the super-admin user and also did you try to re-login?


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
12 years 7 months ago #25033 by ggppdk
try replacing line:
Code:
$usergroups = array_keys($user->get('groups'));

with:
Code:
$usergroups = $user->get('groups'); $usergroups = is_array($usergroups) ? $usergroups : array(); $usergroups = array_keys($user->get('groups'));

and report back

Also if you set default CONTENT language to non-public access level you will get a redirect loop in your site !!!


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
12 years 7 months ago #25040 by Rehne

This is strange for some reason
$user->get('Groups')

yes it is

tried re-saving the super-admin user and also did you try to re-login?

... yes ... with another strange result (see picture)
Code:
$usergroups = $user->get('groups'); $usergroups = is_array($usergroups) ? $usergroups : array(); $usergroups = array_keys($user->get('groups'));
understandably the same error
I think you mean instead of :)
Code:
$usergroups = array_keys($user->get('groups'));
this
Code:
$usergroups = array_keys($usergroups);
otherwise the check above is useless ;)

so the code is
Code:
$usergroups = $user->get('groups'); $usergroups = is_array($usergroups) ? $usergroups : array(); $usergroups = array_keys($usergroups);
and the error is gone

Also if you set default CONTENT language to non-public access level you will get a redirect loop in your site !!!

thanks for pointing

Regards

Please Log in or Create an account to join the conversation.

More
12 years 7 months ago #25041 by ggppdk
Yes right, it should be ...
$usergroups = array_keys($usergroups);

will commit fix, thanks

The flexisystem plugin for J2.5 allows you to exclude some user groups that have specific access levels, and this code does exactly that, and also allows to enter URLs excluded from redirection e.g. a specific com_content article. You can see the new parameters in the plugin configuration

Regards


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
12 years 7 months ago #25042 by Rehne

ggppdk wrote:
The flexisystem plugin for J2.5 allows you to exclude some user groups that have specific access levels, and this code does exactly that, and also allows to enter URLs excluded from redirection e.g. a specific com_content article. You can see the new parameters in the plugin configuration


thank you ... i've already seen and tested it

while I noticed that so far no language strings are set in this the plugin for FC 2
but that's not so important ;)

again a big thanks for your great work

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.673 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline