automatic signup uses wrong name

This plugin allows you to report an issue in MantisBT by sending an email to a particular mail account

Moderators: Developer, Contributor

Post Reply
cubert
Posts: 25
Joined: 23 Mar 2012, 19:53

automatic signup uses wrong name

Post by cubert »

I have been testing automatically signing up people when they e-mail in. I have it set to use email address without the domain name. Instead I'm getting part of the e-mail address, the domain name, and a seemingly random number. For example, user jdoe@mydomain.com sends an e-mail. He is registered with username like jdoe_mydoma_6895. If I delete that and have him e-mail again it might be jdoe_mydoma_16000, or jdoe_mydoma_9604. I have tried every option for where to get the username and it is always in this format. Is it a bug, a feature, or do I have something misconfigured? I can't find a config file for EmailReporting.
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: automatic signup uses wrong name

Post by SL-Gundam »

EmailReporting tries to set the username you requested but needs to check it through two functions: user_is_name_valid( $t_username ) and user_is_name_unique( $t_username )

So it checks whether MantisBT can accept the requested username and whether the username is unique in the system.

If one of these 2 fails EmailReporting will try a last resort which takes the email address of the sender of the email and removes any excess characters that makes it too long and adds some randomly generated numbers to make sure that the user can be created and the issue can be created under his name

I suggest you try adding a user manually with the username you would expect to be created and see what errors MantisBT returns. Either the username exists already or it contains characters that are not allowed
Last edited by SL-Gundam on 03 Apr 2012, 22:57, edited 1 time in total.
cubert
Posts: 25
Joined: 23 Mar 2012, 19:53

Re: automatic signup uses wrong name

Post by cubert »

I can create the user just fine. When I register a new user using their e-mail address minus the domain it pulls in their e-mail address and full name via LDAP just fine. Could EmailReporting be goofing up because I'm using LDAP?
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: automatic signup uses wrong name

Post by SL-Gundam »

What version of EmailReporting are you running? If its 0.8.4 or earlier versions check this: http://www.mantisbt.org/forums/viewtopi ... 963#p47452
cubert
Posts: 25
Joined: 23 Mar 2012, 19:53

Re: automatic signup uses wrong name

Post by cubert »

Thanks for the speedy responses. :-) I downloaded 0.8.4 from https://github.com/mantisbt-plugins/Ema ... /downloads. I went to the link you provided and I can't find a download link for 0.9.0-DEV. In fact, nothing there mentions 0.9.0-DEV. If I click the link to download the repository as a ZIP it wants to name it mantisbt-plugins-EmailReporting-EmailReporting_0.8.4-74-g7fdec1b.zip. Is that actually 0.9.0-DEV?
cubert
Posts: 25
Joined: 23 Mar 2012, 19:53

Re: automatic signup uses wrong name

Post by cubert »

I used the ZIP file download from git and it works as expected now. Thanks.
Post Reply