You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@vcl.apache.org by Satoshi KOBAYASHI <sa...@hitachi-solutions.com> on 2012/03/02 14:14:03 UTC

Changing the "e-mail address field" editable

Hello.

At present, the e-mail address displayed at the "User Preferences" page 
is a "read only" field.  We are thinking that allowing users to change 
the e-mail address by themselves will make it more convenint.  

To do this, we speculate that editing the "userpreferences.php", 
to change the e-mail address field editable, and to post it to the database will work it out.
Please help us if there are anything to consider by making this change.


Thank you.

----------------------
Satoshi KOBAYASHI





Re: Changing the "e-mail address field" editable

Posted by Aaron Coburn <ac...@amherst.edu>.
Satoshi,

The other issue you will need to consider relates to how users authenticate. If you use LDAP, whenever the updateLDAPUser() method is called, the email field is overwritten with the value received from the LDAP server. The same applies to Shibboleth authentication, though here, updateShibUser() is the method in question. Either way, for every non-local user account, the email address is, by default, overwritten in the database whenever the user logs in. 

So in addition to userpreferences.php, you will also need to modify the relevant file in .ht-inc/authmethods.

Aaron


 
--
Aaron Coburn
Systems Administrator and Programmer
Academic Technology Services, Amherst College
(413) 542-5451 acoburn@amherst.edu





On Mar 2, 2012, at 8:14 AM, Satoshi KOBAYASHI wrote:

> Hello.
> 
> At present, the e-mail address displayed at the "User Preferences" page 
> is a "read only" field.  We are thinking that allowing users to change 
> the e-mail address by themselves will make it more convenint.  
> 
> To do this, we speculate that editing the "userpreferences.php", 
> to change the e-mail address field editable, and to post it to the database will work it out.
> Please help us if there are anything to consider by making this change.
> 
> 
> Thank you.
> 
> ----------------------
> Satoshi KOBAYASHI
> 
> 
> 
> 


Re: Changing the "e-mail address field" editable

Posted by Satoshi KOBAYASHI <sa...@hitachi-solutions.com>.
Aaron Coburn, Josh Thompson, and Aaron Peeler.

Thank you for advice. These are cool ideas!
We'll consider to customize based on the advice, and contribute the source code.

----------------------
Satoshi KOBAYASHI



Re: Changing the "e-mail address field" editable

Posted by Aaron Peeler <aa...@ncsu.edu>.
And maybe this 'emailcustom' option could be in the affiliation table?
It would allow for more flexibility for sites supporting multiple
affiliations.

Aaron P.



On Fri, Mar 2, 2012 at 8:50 AM, Josh Thompson <jo...@ncsu.edu> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Satoshi,
>
> I think this is a good idea, especially for local accounts.  For LDAP based
> accounts, the code will look for the email address from LDAP.  If it doesn't
> find it, I believe it will set it to a default based on what is in conf.php.
> There are 2 ways I might go about dealing with that.
>
> 1) Add an extra field to the user table - "emailcustom" that is a boolean.  If
> a user manually sets his password, then set emailcustom to 1, and never
> overwrite the email address with something from LDAP.
>
> 2) Always allow the email address to be updated from LDAP if it is provided,
> but if it is not provided, never update it and only set it to the default when
> the account is initially added to the user table.
>
> Those are just some suggestions of things to think about.
>
> When you finish this, I'd love to see it contributed back.  :)
>
> Josh
>
> On Friday, March 02, 2012 10:14:03 PM Satoshi KOBAYASHI wrote:
>> Hello.
>>
>> At present, the e-mail address displayed at the "User Preferences" page
>> is a "read only" field.  We are thinking that allowing users to change
>> the e-mail address by themselves will make it more convenint.
>>
>> To do this, we speculate that editing the "userpreferences.php",
>> to change the e-mail address field editable, and to post it to the database
>> will work it out. Please help us if there are anything to consider by
>> making this change.
>>
>>
>> Thank you.
>>
>> ----------------------
>> Satoshi KOBAYASHI
> - --
> - -------------------------------
> Josh Thompson
> VCL Developer
> North Carolina State University
>
> my GPG/PGP key can be found at pgp.mit.edu
>
> All electronic mail messages in connection with State business which
> are sent to or received by this account are subject to the NC Public
> Records Law and may be disclosed to third parties.
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.17 (GNU/Linux)
>
> iEYEARECAAYFAk9Q0DAACgkQV/LQcNdtPQNiGwCfefKc9Kcvb1jkB4m0+9M9J/fO
> TpkAn24mIke7PwAQMYap8Rkt8ghvwa4V
> =bmlt
> -----END PGP SIGNATURE-----
>



-- 
Aaron Peeler
Program Manager
Virtual Computing Lab
NC State University

All electronic mail messages in connection with State business which
are sent to or received by this account are subject to the NC Public
Records Law and may be disclosed to third parties.

Re: Changing the "e-mail address field" editable

Posted by Josh Thompson <jo...@ncsu.edu>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Satoshi,

I think this is a good idea, especially for local accounts.  For LDAP based 
accounts, the code will look for the email address from LDAP.  If it doesn't 
find it, I believe it will set it to a default based on what is in conf.php.  
There are 2 ways I might go about dealing with that.

1) Add an extra field to the user table - "emailcustom" that is a boolean.  If 
a user manually sets his password, then set emailcustom to 1, and never 
overwrite the email address with something from LDAP.

2) Always allow the email address to be updated from LDAP if it is provided, 
but if it is not provided, never update it and only set it to the default when 
the account is initially added to the user table.

Those are just some suggestions of things to think about.

When you finish this, I'd love to see it contributed back.  :)

Josh

On Friday, March 02, 2012 10:14:03 PM Satoshi KOBAYASHI wrote:
> Hello.
> 
> At present, the e-mail address displayed at the "User Preferences" page
> is a "read only" field.  We are thinking that allowing users to change
> the e-mail address by themselves will make it more convenint.
> 
> To do this, we speculate that editing the "userpreferences.php",
> to change the e-mail address field editable, and to post it to the database
> will work it out. Please help us if there are anything to consider by
> making this change.
> 
> 
> Thank you.
> 
> ----------------------
> Satoshi KOBAYASHI
- -- 
- -------------------------------
Josh Thompson
VCL Developer
North Carolina State University

my GPG/PGP key can be found at pgp.mit.edu

All electronic mail messages in connection with State business which
are sent to or received by this account are subject to the NC Public
Records Law and may be disclosed to third parties.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)

iEYEARECAAYFAk9Q0DAACgkQV/LQcNdtPQNiGwCfefKc9Kcvb1jkB4m0+9M9J/fO
TpkAn24mIke7PwAQMYap8Rkt8ghvwa4V
=bmlt
-----END PGP SIGNATURE-----