Re: [imp] changing signature at once for all users

2018-08-16 Thread Cristian-Petru Pencov

Thank you Jens for your guidance.
I will post my results here.



Date: Wed, 15 Aug 2018 09:20:12 +0200
From: Jens Wahnes 
Subject: Re: [imp] changing signature at once for all users





Cristian-Petru Pencov wrote:
I'm again in situation to replace some text in user's signature for  
more than fifty accounts.


with the usual "SQL database" backend for preference storage, it is  
possible to write code that retrieves the individual users'  
"identities" preferences (they are serialized PHP objects and can be  
unserialize()d). Note that one user can have several identities, so  
for each user, you are looking at an array of arrays.  Then, there  
is both a "signature" and a "signature_html" preference.  While  
parsing and manipulating the normal signature with preg_replace or  
such shouldn't be too hard to do, things get a bit more complicated  
when you're dealing with HTML code. Depending on what you would like  
to change in every user's signature (e.g. phone number or postal  
address), you might have a hard time parsing the HTML code since  
users may have selected to use a different font (small, bold,  
whatever) for parts of the signature, and they might even have done  
so accidentally.  For instance, imagine you're trying to put a new  
phone number into everyone's signatures, but some user has got  
opening or closing HTML tags inside the phone number because they  
missed to select one digit of the phone number when they edited  
their signature and put all other digits of the phone number into  
boldface.  That really is one mess to sort out if all you wanted to  
do is write one small script to adapt you users' signatures.  Oh,  
and you'll have to serialize() that stuff and write it back to the  
database once you've walked through each user's array of identities.  
 Better have a backup of the old data, too, in case something goes  
wrong.



Jens




--


Cu stima,
Cristian-Petru Pencov
IT specialist

ARTMATCH SRL
Calea Sagului (DN 59), KM 8+550 m
Platforma Incontro, Hala 4-7
307221 Chisoda, Timis, Romania
mobile: +4 0721-202989 | fax: +4 0256-305015
e-mail: cristian.pen...@artmatch.ro | internet: www.artmatch.ro

http://www.shopping-basket.net



Please consider the environment before printing this email.
.

--
imp mailing list
Frequently Asked Questions: http://wiki.horde.org/FAQ
To unsubscribe, mail: imp-unsubscr...@lists.horde.org


Re: [imp] changing signature at once for all users

2018-08-15 Thread Jens Wahnes

Cristian-Petru Pencov wrote:
I'm again in situation to replace some text in user's signature for more 
than fifty accounts.


with the usual "SQL database" backend for preference storage, it is 
possible to write code that retrieves the individual users' "identities" 
preferences (they are serialized PHP objects and can be unserialize()d). 
Note that one user can have several identities, so for each user, you 
are looking at an array of arrays.  Then, there is both a "signature" 
and a "signature_html" preference.  While parsing and manipulating the 
normal signature with preg_replace or such shouldn't be too hard to do, 
things get a bit more complicated when you're dealing with HTML code. 
Depending on what you would like to change in every user's signature 
(e.g. phone number or postal address), you might have a hard time 
parsing the HTML code since users may have selected to use a different 
font (small, bold, whatever) for parts of the signature, and they might 
even have done so accidentally.  For instance, imagine you're trying to 
put a new phone number into everyone's signatures, but some user has got 
opening or closing HTML tags inside the phone number because they missed 
to select one digit of the phone number when they edited their signature 
and put all other digits of the phone number into boldface.  That really 
is one mess to sort out if all you wanted to do is write one small 
script to adapt you users' signatures.  Oh, and you'll have to 
serialize() that stuff and write it back to the database once you've 
walked through each user's array of identities.  Better have a backup of 
the old data, too, in case something goes wrong.



Jens



smime.p7s
Description: S/MIME Cryptographic Signature
-- 
imp mailing list
Frequently Asked Questions: http://wiki.horde.org/FAQ
To unsubscribe, mail: imp-unsubscr...@lists.horde.org

Re: [imp] changing signature at once for all users

2018-08-14 Thread Cristian-Petru Pencov

Hello Mike,
How about a hard way?

I'm again in situation to replace some text in user's signature for  
more than fifty accounts.


thanks again.



Date: Fri, 29 Sep 2017 14:22:53 +
From: Michael J Rubinsky 
Subject: Re: [imp] changing signature at once for all users





Quoting Cristian-Petru Pencov :


Hello,
Is there a way to replace a text in signature for all Users at once?

Let´s say I want to modify some text in signature [which is the  
same] on all users from Horde. But not to login with every user and  
do this from UI interface, or letting them to do it.


Note: In Horde database [phpmyadmin] if I search for this specific  
text it will find it but in BLOB type. Not something replaceable.


Thank you in advance and excuse me if I duplicate this topic.



Signature is part of the user's identity settings, and as such there  
is currently no easy way to update every user's settings.




--


Cu stima,
Cristian-Petru Pencov
IT specialist

ARTMATCH SRL
Calea Sagului (DN 59), KM 8+550 m
Platforma Incontro, Hala 4-7
307221 Chisoda, Timis, Romania
mobile: +4 0721-202989 | fax: +4 0256-305697
e-mail: cristian.pen...@artmatch.ro | internet: www.artmatch.ro

http://www.shopping-basket.net



Please consider the environment before printing this email.
.

--
imp mailing list
Frequently Asked Questions: http://wiki.horde.org/FAQ
To unsubscribe, mail: imp-unsubscr...@lists.horde.org




--
mike
The Horde Project
http://www.horde.org
https://www.facebook.com/hordeproject
https://www.twitter.com/hordeproject




--


Cristian-Petru Pencov
IT specialist

ARTMATCH SRL
Calea Sagului (DN 59), KM 8+550 m
Platforma Incontro, Hala 4-7
307221 Chisoda, Timis, Romania
mobile: +4 0721-202989 | fax: +4 0256-305015
e-mail: cristian.pen...@artmatch.ro | internet: www.artmatch.ro


Please consider the environment before printing this email.
.

--
imp mailing list
Frequently Asked Questions: http://wiki.horde.org/FAQ
To unsubscribe, mail: imp-unsubscr...@lists.horde.org

Re: [imp] changing signature at once for all users

2017-09-29 Thread Michael J Rubinsky


Quoting Cristian-Petru Pencov :


Hello,
Is there a way to replace a text in signature for all Users at once?

Let´s say I want to modify some text in signature [which is the  
same] on all users from Horde. But not to login with every user and  
do this from UI interface, or letting them to do it.


Note: In Horde database [phpmyadmin] if I search for this specific  
text it will find it but in BLOB type. Not something replaceable.


Thank you in advance and excuse me if I duplicate this topic.



Signature is part of the user's identity settings, and as such there  
is currently no easy way to update every user's settings.




--


Cu stima,
Cristian-Petru Pencov
IT specialist

ARTMATCH SRL
Calea Sagului (DN 59), KM 8+550 m
Platforma Incontro, Hala 4-7
307221 Chisoda, Timis, Romania
mobile: +4 0721-202989 | fax: +4 0256-305697
e-mail: cristian.pen...@artmatch.ro | internet: www.artmatch.ro

http://www.shopping-basket.net



Please consider the environment before printing this email.
.

--
imp mailing list
Frequently Asked Questions: http://wiki.horde.org/FAQ
To unsubscribe, mail: imp-unsubscr...@lists.horde.org




--
mike
The Horde Project
http://www.horde.org
https://www.facebook.com/hordeproject
https://www.twitter.com/hordeproject


binlh7VU5ggDO.bin
Description: PGP Public Key


pgp0qXKeVIRW9.pgp
Description: PGP Digital Signature
-- 
imp mailing list
Frequently Asked Questions: http://wiki.horde.org/FAQ
To unsubscribe, mail: imp-unsubscr...@lists.horde.org