Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#181 2006-07-18 20:18:13
Re: mem_self_register
alannie,
Currently this functionality does not exist. I shall add this to my todo list.
Please post questions pertaining to my moderation plugins in this thread. The mem_self_register and moderation plugins are designed to enchance eachother, but they are different and it’s easier for me when plugin questions are organized in the proper threads. This is part of the reason why I missed your first question.
Offline
#182 2006-07-18 20:51:58
- alannie
- Member
- From: Minnesota, USA
- Registered: 2005-09-15
- Posts: 150
Re: mem_self_register
Manfre, sorry about that, I got so caught up in reading the messages I didn’t realize I was posting in the wrong thread! I’ll be more careful in the future. Thanks for letting me know.
Offline
#183 2006-07-19 21:40:29
Re: mem_self_register
Ok – I have a few problems with version 8.0:
First problem is when submitting a completed form using an email address with a hyphen in the domain name, a little ‘1’ appears to the right of the email field (where email_warn appears), as opposed to the form submitting and displaying the ‘Account Created’ message. (If the form is submitted without any data I get the warn messages as expected.)
The second problem happens when I moved the ‘mem_self_register’ tag inside some ‘if_section’ tags so that the registration form only displays when the user is in the ‘apply’ section of the website.
Now when i access my site section <pre>http://127.0.0.1/newsite/?s=apply</pre> and click submit, i just get bounced to the homepage of the site <pre>http://127.0.0.1/newsite/</pre>
Is this because the plug-in doesn’t recognise that it is being used inside a site section?
Currently the forms ‘action’ attribute says: <pre>action=”/newsite/”</pre>
Should this be: <pre>action=”/newsite/?s=apply”</pre>
EDIT: I fixed the above by getting clean URLs working on the site :-p
Lastly, and probably most importantly, when submitting a correctly filled in form, I get the following message listing out at the top of the screen (with the ‘Account Created’ form correctly displaying on the page, and emails sent to the new user and admin):
<pre>insert into `ign_users` set privs = ‘Array’, name = ‘jamesjoyce’, email = ‘jj@yahoo.com’, RealName = ‘James Joyce’, pass = password(lower(‘7c6p5q’)), nonce = ‘e9c88e089b67fbf60cc51f6a3f64dd73’, address=‘London’, phone=‘1234567890’</pre>
The user is added to the ‘ign_user’ database, albeit with priviledges of ‘none’ (preferences are set to 4 – Staff Writer)
And one final, final thing: it would be good to be able to have a different error message display when a duplicate user name is encountered, rather than just ‘username required’ – ‘username already exists’ would be a little clearer.
any ideas?? thanks!
(btw i’m just using all the default install forms etc. before attempting to add any new user fields…)
Last edited by lukepermsn (2006-07-24 12:44:14)
“Absorb what is useful, Discard what is not, Add what is uniquely your own” – Bruce Lee
Offline
#184 2006-08-03 18:58:29
Re: mem_self_register
Hi Manfre,
Are you still working on this plug-in?
Would be great to get a response to my feedback on v8.0…
In the meantime – is there an earlier version available to download somewhere, as v8.0 is fairly unusable at present.
cheers.
“Absorb what is useful, Discard what is not, Add what is uniquely your own” – Bruce Lee
Offline
#185 2006-08-07 13:43:00
Re: mem_self_register
Uploaded 0.8.1 which removes some of the debug statements that I had forgotten to remove.
To have a more meaningful response to duplicates, add the userwarn attribute to the self register tag with a message similiar to “Username is either invalid or not available”.
Default privilige. Go to the advanced TXP preferences under the admin tab. Make sure that mem_self_new_user_priv is not set to 0. I just noticed in the current 4.0 dev branches, that all the custom preferences are being shown as editable text fields. I’ll look in to this. For now, one of the numbers below to pick the default that you want.
$levels = array( 0 => mem_self_gTxt(‘none’), 6 => mem_self_gTxt(‘designer’), 5 => mem_self_gTxt(‘freelancer’), 4 => mem_self_gTxt(‘staff_writer’), 3 => mem_self_gTxt(‘copy_editor’), 2 => mem_self_gTxt(‘managing_editor’), 1 => mem_self_gTxt(‘publisher’) );
Offline
#186 2006-08-07 18:30:38
Re: mem_self_register
ahh wonderful!
i’m going to have a play with this now… i will donate to it’s future development for sure, as this seems to be a very useful plug-in.
thanks for you work.
“Absorb what is useful, Discard what is not, Add what is uniquely your own” – Bruce Lee
Offline
#187 2006-08-23 22:01:08
Re: mem_self_register
lukepermsn wrote:
<blockquote>The second problem happens when I moved the ‘mem_self_register’ tag inside some ‘if_section’ tags so that the registration form only displays when the user is in the ‘apply’ section of the website.
Now when i access my site section <pre>http://127.0.0.1/newsite/?s=apply</pre> and click submit, i just get bounced to the homepage of the site <pre>http://127.0.0.1/newsite/</pre>
</blockquote>
Lukepermsn, I needed to do the same, but switching on clean-urls isn’t an option for me. The alternative was to edit the mem_self_register_form() function and change the following lines to:
<pre> $action_url = $_SERVER[‘REQUEST_URI’];
$qs = strpos($action_url,’?’);
// if ($qs) $action_url = substr($action_url, 0, $qs);
if (!$qs) $action_url .= “?s=apply”;
</pre>
I added the last line shown above, having to (hard code) the ‘?s=apply’ to the form if there wasn’t already a querystring specified. This sorted the problem. I also commented out the line that seemed to strip off any querystring value – not sure why Manfre is doing this.
<blockquote>Lastly, and probably most importantly, when submitting a correctly filled in form, I get the following message listing out at the top of the screen (with the ‘Account Created’ form correctly displaying on the page, and emails sent to the new user and admin):
<pre>insert into `ign_users` set privs = ‘Array’,
name = ‘jamesjoyce’,
email = ‘jj@yahoo.com’,
RealName = ‘James Joyce’,
pass = password(lower(‘7c6p5q’)),
nonce = ‘e9c88e089b67fbf60cc51f6a3f64dd73’, address=‘London’, phone=‘1234567890’</pre>
</blockquote>
The problem here is within the mem_get_pref() function. Look for the following…
<pre>if (!empty($val) && in_array($val,$pref_cache[$name]))
return $pref_cache[$name][$val];
else
return $pref_cache[$name];
</pre>
The ‘in_array’ command needs to be replaced with ‘array_key_exists’ as in…
<pre>if (!empty($val) && array_key_exists($val,$pref_cache[$name]))
return $pref_cache[$name][$val];
else
return $pref_cache[$name];
</pre>
And lastly, while I’m at it, during install of mem_self_register I get the following errors reported…
Failed to add pref ‘mem_self_use_ign_db’. Incorrect integer value: ‘yesnoradio’ for column ‘position’ at row 1
Failed to add pref ‘mem_self_new_user_priv’. Incorrect integer value: ‘yesnoradio’ for column ‘position’ at row 1
To fix them (and create the prefs) add the ‘0,’ before the ‘yesnoradio’ and ‘priv_levels’ in these two lines in mem_self_register_install() function…
<pre>if ( mem_set_pref(‘mem_self_use_ign_db’,$use_ign_db,‘self_reg’,1,0,‘yesnoradio’)) {</pre>
<pre>if ( mem_set_pref(‘mem_self_new_user_priv’,$new_user_priv,‘self_reg’,1,0,‘priv_levels’)) {</pre>
Hope that helps anyone.
—————
Dave-H
Offline
#188 2006-08-26 13:13:39
- maryse
- New Member
- Registered: 2006-08-24
- Posts: 6
Re: mem_self_register
LeeUmm wrote:
<blockquote> Hi,
Just installed the latest version of this plugin.
When I ran the installation wizard I accidentally set new members permissions to “none”. No biggy I thought and I changed this setting to what I wanted in the admin panel for this plugin.
Still though when members sign up, they are given no permissions. I even deleted the plugin and installed again but nothing.
If I try and run the installation wizard when the plugin is already installed, it tells me it’s skipping the part for the user permissions as they are already found and it tells me the correct level I’m trying to get. 2, not 0.
Where in the code would I edit this to reflect the permissions I wish them to have?</blockquote>
First of all, thanks for the great plugin! :)
Has anyone found a solution for this? When I installed, I set the privilege to 5 and it is also what it is set to in my advanced preferences next to mem_self_new_user_priv. But still, when someone registers, they have no privileges and can’t login… so I still have to set the privilege to 5 for each new user manually before they can login and submit an article. Is there something else I can do so that as soon as they register they have a specific privilege level other than 0?
Thanks in advance for any help!
Offline
#189 2006-09-10 17:32:19
- M_i
- Member
- Registered: 2006-03-05
- Posts: 122
Re: mem_self_register
maryse wrote:
Has anyone found a solution for this? When I installed, I set the privilege to 5 and it is also what it is set to in my advanced preferences next to mem_self_new_user_priv. But still, when someone registers, they have no privileges and can’t login… so I still have to set the privilege to 5 for each new user manually before they can login and submit an article. Is there something else I can do so that as soon as they register they have a specific privilege level other than 0?
I’m having the same problem. New users are registered with privileges “none”, even though the plugin is set differently.
Hope this can be fixed, because this would be a very useful plugin for me, but as it stands manually adding users is still the better option.
Offline
#190 2006-09-12 08:56:26
Re: mem_self_register
One ‘workaround’ is to go in and manually set the priveliges once you receive an email about a new user registration. It’s a pain, but it works!
“Absorb what is useful, Discard what is not, Add what is uniquely your own” – Bruce Lee
Offline
#191 2006-09-12 09:46:13
- M_i
- Member
- Registered: 2006-03-05
- Posts: 122
Re: mem_self_register
lukepermsn wrote:
One ‘workaround’ is to go in and manually set the priveliges once you receive an email about a new user registration. It’s a pain, but it works!
Yes, but then I might as well stick with my current system: a zem_contact form where people fill in their name and email, and then I manually create a user account.
Between people having to wait for their password a few hours, and people getting a password instantly but it not being valid for a few hours, I’d say the first is still the better option. Will save me lots of “help! my password doesn’t work!”-emails, I’m sure.
But this priveliges problem is widespread then, eh?
Too bad this plugin still isn’t working properly. Will check back in in another few months.
Offline
#192 2006-09-12 14:51:24
Re: mem_self_register
M_i wrote:
But this priveliges problem is widespread then, eh?
Too bad this plugin still isn’t working properly. Will check back in in another few months.
Yes I’m still having this problem as well. I’ve been checking this thread for months hoping to see a fix but to no avail.
Offline