[solved]separate username and email fields in FrontEndUsers
Posted: Thu May 12, 2011 3:57 am
I tried posting this question last night, but it seems to have disappeared...
I'm working on a local install on Xammp on XP. My CMSMS System Information says I have FEU 1.12.13 but I installed it manually from a download of FrontEndUsers-1.12.14.tar.gz so... I'm honestly not certain exactly which version I have here. MY Module Manager does not show a newer verison available, so guess it's safe to say I have the newest, whichever number it is!
I have a live site running an older vertsion, and in the preferences of feusers, there is a preference "Email address is username" which does not seem to exist on this newer version. I am building a site which needs the userid and email to be separate fields as the user needs a searchable name visible to other feusers but the email should remain private and just be for admin use.
I couldn't figure it out from the database tables which didn't seem to have anything like an email field, so poked around in the code until I found the GetEmail function in FrontEndUsers.api.php and saw how the email is being stored in the case where the username_is_email preference is not set, that the code is treating it like all the fields I setup.
And I poked around a bit more until I found that preference is being hard-coded in the method.install.php file.
I could either rewrite the GetEmail function to not have the case based on the prefernece or comment out the bit where the preference is set to get this to work the way I need to, but... I guess my question is what can I expect from future development of this module? Is this stuff just left in for backwards-compatibility and the preference will go away permanently eventually?
My concern is... in the self registration module, there are smarty variables $name $username and $email, and I want to be able to use those, and possible other modules dependent on feusers, so want to make the least change possible to get things to do what I need them to. In short, I don't want to rewrite every module I might ever want that is based on FEusers.
Or should I just go to an earlier version of FEusers?
Advice about how to handle this?
I'm working on a local install on Xammp on XP. My CMSMS System Information says I have FEU 1.12.13 but I installed it manually from a download of FrontEndUsers-1.12.14.tar.gz so... I'm honestly not certain exactly which version I have here. MY Module Manager does not show a newer verison available, so guess it's safe to say I have the newest, whichever number it is!
I have a live site running an older vertsion, and in the preferences of feusers, there is a preference "Email address is username" which does not seem to exist on this newer version. I am building a site which needs the userid and email to be separate fields as the user needs a searchable name visible to other feusers but the email should remain private and just be for admin use.
I couldn't figure it out from the database tables which didn't seem to have anything like an email field, so poked around in the code until I found the GetEmail function in FrontEndUsers.api.php and saw how the email is being stored in the case where the username_is_email preference is not set, that the code is treating it like all the fields I setup.
And I poked around a bit more until I found that preference is being hard-coded in the method.install.php file.
I could either rewrite the GetEmail function to not have the case based on the prefernece or comment out the bit where the preference is set to get this to work the way I need to, but... I guess my question is what can I expect from future development of this module? Is this stuff just left in for backwards-compatibility and the preference will go away permanently eventually?
My concern is... in the self registration module, there are smarty variables $name $username and $email, and I want to be able to use those, and possible other modules dependent on feusers, so want to make the least change possible to get things to do what I need them to. In short, I don't want to rewrite every module I might ever want that is based on FEusers.
Or should I just go to an earlier version of FEusers?
Advice about how to handle this?