[dev] Allowing reuse of accounts

NarfistA spo_argento at hotmail.com
Tue Jan 25 05:39:50 PST 2005


   Hi, I would like to share a problem I have, It would be nice if the
solution comes from Horde itself.

   We have several thousands of clients with emails accounts. It isn't
rare at all for one of them to discontinue the service, and for a new or
existent user to ask for the unused address.

   Some action would then be required to clean preferences and objects
 from Turba, and things like that.

   Although one way to go would be to trigger a process on the event of
the deleting of the old email address, we'd like to make the system to
collect its own garbage, sort of speak.

   I have a way to get a unique ID for the account, which would change if
an account were deleted/recreated. I already made a driver which extends
Prefs_sql and modifies the user so ID and user get related and if ID
changes then it would be like a new account. For example, using sql
driver a preference would be stored:

   pref_uid: jigermano at uolsinectis.com.ar_327876
pref_scope: horde
  pref_name: show_sidebar
pref_value: 1

   Which worked ok. But it doesn't seem to be so simple for Turba.

   I was thinking if one of the hook functions could give me a solution,
or maybe a NEW hook funcion could be added and in conjunction with the
Auth class and the Identity class get the solution. The idea would be to
make the user ids for the backends uniques with the help of the new
hook.

   For example, I modified Auth::getAuth() to add the ID; I got the same
result in prefs and in Turba:

              object_id: 234f058dc1f2c2552cccf23aa8944998
              owner_id: jigermano at uolsinectis.com.ar_327876
           object_type: Object
            object_uid:
20050124185240.456zgiw4291c at test207.sinectis.com.ar
        object_members: NULL
           object_name: Gonzalo Arana
          object_alias: NULL
          object_email: garana at uolsinectis.com.ar
    object_homeaddress: NULL
    object_workaddress: NULL
      object_homephone: NULL
      object_workphone: NULL
      object_cellphone: NULL
            object_fax: NULL
          object_title: NULL
        object_company: NULL
          object_notes: NULL
   object_pgppublickey: NULL
object_smimepublickey: NULL
    object_freebusyurl: NULL

   This is just for a test, since I have no idea what consequences will
the change bring to the system.

   Is there an easier/more correct way to achieve this?

   Thanks in advance,

--

   Juan


More information about the dev mailing list