| User | Post |
|
9:05 am February 3, 2010
| Nictech
Member
| | | |
|
| posts 8 |
|
|
I am using RS and Capabilty Manager v 131 on WP 2.9.1
After upgrading to latest RS version 1.15 my users with multiple roles fail on login and I get this error:
SolBio Energy Portal: Solar and Biofuel Power GenerationWarning: array_intersect() [function.array-intersect]: Argument #1 is not an array in /home/xxxx/public_html/wp-content/plugins/role-scoper/roles_rs.php on line 400
This only affects multiple role users, single role users appear fine.
Any ideas? Live site so bit of panick setting in.
Thanks
|
|
|
12:16 pm February 3, 2010
| Kevin
Admin
| | | |
|
| posts 2503 |
|
|
Nictech said:
I am using RS and Capabilty Manager v 131 on WP 2.9.1
After upgrading to latest RS version 1.15 my users with multiple roles fail on login and I get this error:
SolBio Energy Portal: Solar and Biofuel Power GenerationWarning: array_intersect() [function.array-intersect]: Argument #1 is not an array in /home/xxxx/public_html/wp-content/plugins/role-scoper/roles_rs.php on line 400
This only affects multiple role users, single role users appear fine.
One of the multiple roles must have no capabilities. I had not tested against that nonstandard config, and did not have any users volunteer to test the beta / release candidates.
It can be easily corrected by editing roles_rs.php as follows:
change:
$caps = array_intersect( $role->capabilities, array(true) );
to:
if ( is_array( $role->capabilities ) )
$caps = array_intersect( $role->capabilities, array(true) );
else
$caps = array();
|
|
|
12:27 pm February 3, 2010
| Nictech
Member
| | | |
|
| posts 8 |
|
|
Kevin,
Brilliant, worked perfectly.
I did get reply from Capabilty Manager guy, he claims the CapsMan will not work for users with multi Roles . Sure glad you proved him wrong:)
Thank you
|
|
|
12:36 pm February 3, 2010
| Kevin
Admin
| | | |
|
| posts 2503 |
|
|
Great, thanks for letting me know.
|
|
|
1:09 pm February 3, 2010
| Nictech
Member
| | | |
|
| posts 8 |
|
|
Kevin,
Appears this fix caused another error.
Now all my attached documents come up 404 not found.
Thoughts?
|
|
|
1:26 pm February 3, 2010
| Kevin
Admin
| | | |
|
| posts 2503 |
|
|
For now, can you try turning off Roles > Options > File Filtering.
|
|
|
2:01 pm February 3, 2010
| Nictech
Member
| | | |
|
| posts 8 |
|
|
Filtering was off.
I am thinking it is the sync with CapsMan, a new created user is not affected at this point…
Edit
new users affected as well, only links to files outside my uploads folder will work.
Anything uploaded and created through site admin causes a 404 not found when clicked in post.
Update:
My problem not your RS code fix above, switched back to original code and problem remains.
|
|
|
2:08 pm February 3, 2010
| Kevin
Admin
| | | |
|
| posts 2503 |
|
|
You might try giving your users their secondary role via Role Scoper instead. Roles > General
|
|
|
2:59 pm February 3, 2010
| Nictech
Member
| | | |
|
| posts 8 |
|
|
No go, tried adding several new roles with no luck.
For some strange reason my uploads are going to wrong folders???
Just uploaded a document and it went to uploads/2009/12
Looks like time to import a backup, prior to CapsMan plugin and start from scratch.
RS appears to be functioning properly.
|
|