FrontEndUsers and regular expression problem

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
numer9

FrontEndUsers and regular expression problem

Post by numer9 »

Hey,
on my new project i'm using the FrontEndUsers module. First of all - thanks for the great job :D

But I'm a bit confused.
In the "Users" tab (of FEU admin panel) there are 2 possibilities to search for some users. First is to use regex on user's name, second is to use regex on some property. Ok. First test - just asterisk (*), with nothing more - and the FEU is down.

Be careful if you want to reproduce it :D on my site it's stuck for good. I had to enter the code and manually fix params['filter_regex'] and set it to something else (blank sign). The same test on the second regex field - and FEU is down again. The same happens every time the asterisk is the leading char.

And then another test -> created user test1, test2 and pest1. Entered regex t*1 -> it doesn't work again.
During those tests I was smarter - I've opened two windows with the same form, when entered the buggy regex in first one (FEU down) - switched to another window (another instance of the same site) and entered some "correct" regex, for example "aaa". The $params[] were overwritten and the App wasn't so badly broken... but that's not a good solution.

So - am I missing something? Some advice anyone? And one more question - where the hell are those $params[] held? I tried clearing my browser cache, grep-ped database and all CMS files - nothing.

???
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: FrontEndUsers and regular expression problem

Post by calguy1000 »

a) setting the field to empty and hitting submit should reset the filter.
b) it uses true regular expressions, not 'wildcard matching'.
    to search for users with an f in their name, just put an 'f' in the field.
    to search for users beginning with f put "^f" in the field
    to search for users ending with f put "f$" in the field.

Again, these are true regular expressions, not 'wildcard matching'.  it's very powerful, you should look up perl or php regular expressions.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
numer9

Re: FrontEndUsers and regular expression problem

Post by numer9 »

thanks calguy!

i'm pretty familiar with perl and php (and its reg expr), so "true pattern matchning" is ok with me. I just didn't think of it at first... I couldn't find that part in any documentation nor forum topic, that's why i asked.

that part is clear now :D

but as far as the bug - i know that empty field will clear the params and the form will work again. but still - try inserting asterisk (*) sign and hitting enter. You'll get the error and no access to the form, at least that's what i got (on newest version of all modules)...  :( the same happens when inserted 't??' (double question mark). It's not because i don't now regex, it's just that i'm planning to introduce the site (and FEU) to some "fresh" users and i'm testing it several ways to be sure that it won't stop...

And one more thing:
i've set the email field for one group - as an option. when logging in and going to "change settings" option, changing some stuff and leaving email blank - i'm getting an error "invalid email". Blank is wrong?
And last thing - after hitting "submit" (when no error is given) - i'm thrown to main site (index.php), is there a way to manipulate that option?
Last edited by numer9 on Fri Jan 12, 2007 8:00 pm, edited 1 time in total.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: FrontEndUsers and regular expression problem

Post by calguy1000 »

Okay, I fixed (somewhat) in svn the problem when you have an invalid regular expression
and
fixed problems with optional email address fields too.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: FrontEndUsers and regular expression problem

Post by calguy1000 »

Also, there's a preference "PageID/Alias for Change Settings form" that specifies where to jump to after this page is submitted.  if empty, it jumps to the default page.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
numer9

Re: FrontEndUsers and regular expression problem

Post by numer9 »

Hey,
i'll check the fix asap - thanks for another quick reaction.

As far as "PageID/Alias for Change Settings form" - i got that setting set, but on my "custom change setting site" the form got the action forwarding to "index.php":

Code: Select all

<!-- change settings template -->
Ustawienia
<form id="m5moduleform-2" name="m5moduleform-2" method="post" action="index.php">
not to that "custom" page...

I'm not providing "real-life" urls because it's all in Polish and it wouldn't be easy to explain everything on the site - i hope it's not a problem. If you can't reproduce my cases i'll create an English-lang env and let u know.

BTW - because of my project, FEU has 95% Polish translations already done :D
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: FrontEndUsers and regular expression problem

Post by calguy1000 »

I'll see about taking a look at this this weekend.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
numer9

Re: FrontEndUsers and regular expression problem

Post by numer9 »

I've checked the 1.1.3-svn version of FEUSers and the problem with regex isn't critical any more :D thanks!
And the email validation - it passes the blank email (allright!), but i got the impression that you also disabled "email format check" -> now the form buys even entries with no @ sign; and afterwards it causes problem when hitting "password reminder"... or am i missing something?
numer9

Re: FrontEndUsers and regular expression problem

Post by numer9 »

another bunch of tests, now on 1.1.13-svn: adding a FEU group (just the group) and trying to delete it - i get the error "cannot delete group with assigned users", but the group is fresh and has no users in it!  ???

i'll add that i double-checked the sql structure, and there's no connection to my group in cms_module_feusers_belongs.

*****************
i'm answering myself:

in action.do_deletegroup.php, at about line 51, there is:

Code: Select all

if( count($this->GetUsersInGroup( $roup['id'] )) != 0 )
change it to

Code: Select all

if( count($this->GetUsersInGroup( $group['id'] )) != 0 )
-> a little mistake during restructuring module.

Sorry for the amount of tests, but i really like the module and try to find out everything about it :D
Last edited by numer9 on Mon Jan 15, 2007 3:29 pm, edited 1 time in total.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: FrontEndUsers and regular expression problem

Post by calguy1000 »

Okay, will take a look at that stuff when I get a chance.  I didn't get a chance this weekend, what with company, etc.  and I was working on the new Questions module.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Locked

Return to “CMSMS Core”