[dev] Allowing reuse of accounts
jigermano at uolsinectis.com.ar
jigermano at uolsinectis.com.ar
Tue Jan 25 13:30:28 PST 2005
Citado por Jan Schneider <jan at horde.org>:
>
> Zitat von Juan Germano <jigermano at uolsinectis.com.ar>:
>
>> Citado por Jan Schneider <jan at horde.org>:
>>
>>>
>>> Zitat von NarfistA <spo_argento at hotmail.com>:
>>>
>>>> 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.
>>>
>>> The basis for that feature is there already (in Horde 3). The user
>>> administration interfaces allows to clean all user data or to remove the
>>> user data when deleting a user. The problem is, that not all backends
>>> support this API yet. Actually only the preference backend is currently
>>> supported.
>>> It would be great if someone could write the missing api methods for the
>>> remaining backends and applications.
>>>
>>>> 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.
>>>
>>> You should use the vinfo hook for that purpose, it alters user names used
>>> internally in Horde, to avoid name clashing if multiple users with the same
>>> name can login to the same Horde server.
>>
>> I'm using IMP for authentication (against IMAP). When modifing the
>> user name in
>> vinfo hook can't login.
>
> Ah, true. Then you need to hack the code, or use the option above.
>
> Jan.
Thanks for all your help Jan. I finally did this with another hook:
_username_hook_frombackend
it returns $userID.'_'.$uniqueDbId
so I get something like this:
Jan 25 18:20:47 HORDE [debug] [imp] SQL Query by Prefs_sql::retrieve(): SELECT
pref_scope, pref_name, pref_value FROM horde_prefs WHERE pref_uid =
'jigermano at uolsinectis.com.ar_327876' AND (pref_scope = 'imp' OR pref_scope =
'horde') ORDER BY pref_scope [on line 147 of
"/usr/local/lib/php/Horde/Prefs/sql.php"]
for prefs, for example.
Cheers!
--
Juan
More information about the dev
mailing list