[#14478] Enhanced function of horde-active-sessions
Summary Enhanced function of horde-active-sessions
Queue Horde Base
Queue Version 5.2.12
Type Enhancement
State Feedback
Priority 1. Low
Owners
Requester frank.richter@hrz.tu-chemnitz.de
Created 2016-09-23 (1821 days ago)
Due
Updated 2016-11-01 (1782 days ago)
Assigned
Resolved
Milestone
Patch Yes

Comments
frank.richter@hrz.tu-chemnitz.de 2016-09-23 13:19:16
  * extended information on -ll: user, timestamp, IP, Id, Browser
  * added -ll user   to get information on this user
  * added -r user   to remove a session

I attached all the changed horde-active-sessions script.
It works for me, pleae review.

Regards,
Frank

ddangel0@rosario.gov.ar 2016-09-23 17:20:30
>  * extended information on -ll: user, timestamp, IP, Id, Browser
>  * added -ll user   to get information on this user
>  * added -r user   to remove a session
>
> I attached all the changed horde-active-sessions script.
> It works for me, pleae review.
>
> Regards,

i tested with redis and only show me the list of all sessions.

> Frank


ddangel0@rosario.gov.ar 2016-09-23 17:55:40
>>  * extended information on -ll: user, timestamp, IP, Id, Browser
>>  * added -ll user   to get information on this user
>>  * added -r user   to remove a session
>>
>> I attached all the changed horde-active-sessions script.
>> It works for me, pleae review.
>>
>> Regards,
>
> i tested with redis and only show me the list of all sessions.
>
>> Frank
>
forget this comment?IT WORKS !!!!!
thanks men

Jan Schneider <jan@horde.org> 2016-10-12 12:38:22
A few comments:

- The -ll output should probably stay as-is, if people already rely on 
the output, scripting it in some way
   - -lll should be used instead for the more detailed information
   - -ll could still receive the optional user parameter.
- You may want to switch to Horde_Argv because the parameter parsing 
is getting complicated: 
https://www.horde.org/libraries/Horde_Argv/docs/README
- You should check the return value of $sessionHandler->destroy()
- You should only output the number of sessions with the -l* flags.

frank.richter@hrz.tu-chemnitz.de 2016-10-14 13:59:26
> - The -ll output should probably stay as-is, if people already rely 
> on the output, scripting it in some way
>   - -lll should be used instead for the more detailed information
>   - -ll could still receive the optional user parameter.

Ok.

> - You may want to switch to Horde_Argv because the parameter parsing 
> is getting complicated: 
> https://www.horde.org/libraries/Horde_Argv/docs/README

In my first try it does'nt accept -ll
exception 'Horde_Argv_OptionException' with message 'invalid long 
option string '-ll': must start with --, followed by non-dash' in 
/usr/share/pear/Horde/Argv/Option.php:323

> - You should check the return value of $sessionHandler->destroy()

Is it boolean? Or shall I use a try ... catch?

> - You should only output the number of sessions with the -l* flags.

Ok.

Frank

Jan Schneider <jan@horde.org> 2016-10-14 14:41:42
>> - The -ll output should probably stay as-is, if people already rely
>> on the output, scripting it in some way
>>   - -lll should be used instead for the more detailed information
>>   - -ll could still receive the optional user parameter.
>
> Ok.
>
>> - You may want to switch to Horde_Argv because the parameter parsing
>> is getting complicated:
>> https://www.horde.org/libraries/Horde_Argv/docs/README
>
> In my first try it does'nt accept -ll
> exception 'Horde_Argv_OptionException' with message 'invalid long 
> option string '-ll': must start with --, followed by non-dash' in 
> /usr/share/pear/Horde/Argv/Option.php:323

Ah, okay. Then we probably have to stick with the current argument 
parsing, to maintain backward compatibility.

>> - You should check the return value of $sessionHandler->destroy()
>
> Is it boolean? Or shall I use a try ... catch?

It's a boolean.

>> - You should only output the number of sessions with the -l* flags.
>
> Ok.
>
> Frank


frank.richter@hrz.tu-chemnitz.de 2016-11-01 15:18:41
>>> - The -ll output should probably stay as-is, if people already rely
>>> on the output, scripting it in some way
>>>   - -lll should be used instead for the more detailed information
>>>   - -ll could still receive the optional user parameter.
>>
>> Ok.
>>
>>> - You may want to switch to Horde_Argv because the parameter parsing
>>> is getting complicated:
>>> https://www.horde.org/libraries/Horde_Argv/docs/README
>>
>> In my first try it does'nt accept -ll
>> exception 'Horde_Argv_OptionException' with message 'invalid long
>> option string '-ll': must start with --, followed by non-dash' in
>> /usr/share/pear/Horde/Argv/Option.php:323
>
> Ah, okay. Then we probably have to stick with the current argument 
> parsing, to maintain backward compatibility.
>
>>> - You should check the return value of $sessionHandler->destroy()
>>
>> Is it boolean? Or shall I use a try ... catch?
>
> It's a boolean.
>
>>> - You should only output the number of sessions with the -l* flags.
>>
>> Ok.

Attached my next try.

Frank