Forum

This forum is powered by Mingle Forum — Cartpauj.com

Welcome Guest 

Show/Hide Header

Welcome Guest, posting in this forum requires registration.

Pages: 1 2 3 4 5 [6]
Author Topic: User Name Already Taken
dellos
Newbie
Posts: 2
Permalink
Post Re: User Name Already Taken
on: Mar 11, 05:09 PM
Quote

Well I have the same problem but can't find any sollution but delete the error massage. I hope that admins and moderators will find the sollution for the problem! Lot of guys here wgot the same one and no sollutin found... that's a shame... is mingle forum still live project ??

gramcracke-
r64
Advanced
Posts: 24
Permalink
Post Re: User Name Already Taken
on: May 26, 05:04 PM
Quote

Yes get rid (comment out) the lines of code (mngluser.php) below and write your own validation to check if email or username exists. Pull all of the usernames from the SQL column, then use PHP to check if any matches the one the user selected. Do the same with e-mail. Must be a problem with the paths in the object.

Somehow, the if statements below are always true, hence the errors appearing no matter what.

$user_id = username_exists( $user_login );
$available = MnglUtils::username_is_available( $user_login );

if ( $user_id or !$available)
$errors[] = __('Username is Already Taken.','mingle');

if(email_exists($user_email))
$errors[] = __('Email Address has already been used by another user.','mingle');

gramcracke-
r64
Advanced
Posts: 24
Permalink
Post Re: User Name Already Taken
on: May 26, 05:11 PM
Quote

Scratch that - Pear crashes if you remove the code and the 'duplicate' username is allowed. I'll have to take a closer look. Not coded for human reading.

gramcracke-
r64
Advanced
Posts: 24
Permalink
Post Re: User Name Already Taken
on: May 26, 06:13 PM
Quote

Ok I found the solution. Open classes/controller/MnglUsersController and insert this code between the last two closing brackets of the process_signup_form function, roughly line 156. Place the code:

if(empty($errors)) {
$creds = array();

$creds['user_login'] = $user_login;
$creds['user_password'] = $new_password;
$creds['remember'] = $rememberme;

if(!function_exists('wp_signon'))
require_once(ABSPATH . WPINC . '/user.php');

wp_signon($creds);

$redirect_to = ((!empty($redirect_to))?$redirect_to:get_permalink($mngl_options->activity_page_id));

MnglUtils::wp_redirect($redirect_to);
exit;
}

This logs the user in after they sign up and takes them to the activity page.

auxlifesty-
le
Newbie
Posts: 2
Permalink
Post Re: User Name Already Taken
on: Aug 23, 06:31 AM
Quote

For me itis not working, because there is already if(empty($errors))
even after exhanging, there are even more error

www.auxlifestyle.com

bazman
Beginner
Posts: 7
Permalink
Post Re: User Name Already Taken
on: Nov 21, 11:48 AM
Quote

I have the same problem, It seems the code is executed twice…I get this problem with registration, sending message and uploading avatar. The first action works, but for some reason an second action is executed, and that gives the errors. Is has something to do with mingle. I Use Woo Themes. Anybody news?

Zeke
Newbie
Posts: 4
Permalink
Post Re: User Name Already Taken
on: Apr 19, 09:55 PM
Quote

Quote from gramcracker64 on May 26, 06:13 PM
Ok I found the solution. Open classes/controller/MnglUsersController and insert this code between the last two closing brackets of the process_signup_form function, roughly line 156. Place the code:

Has anyone found the solution yet? Because this one isn't working. Either that or the "roughly line 156" is completely different on my php file. There is no closing brackets in my MnglUsersController file at line 156. Looks like there is at 149/150 but i'm not a php expert. I've tried it in between those, after those, before those.. and it will take me to the success page, but NOW I have another error. The "Success" page comes up all by itself (not within the post container wrapper like it should) with all kinds of header errors in pluggable php file.

Pages: 1 2 3 4 5 [6]
Mingle Forum by cartpauj
Version: 1.0.34 ; Page loaded in: 0.192 seconds.