Forum .LRN Q&A: Re: Stopping the Students login After expiration

Collapse
Posted by Peter Marklund on
VenuMadhav,
one approach would be to schedule a procedure to change the member_state (see acs-kernel/sql/community-core-create.sql) of the user to 'deleted' after the expiration date (preferably you would have the state 'expired' but there is currently no such state). You might have to also log out any users who are currently logged in.

The advantage of this approach is that you don't have to customize (fork from) the OpenACS or dotLRN code.

Where are you storing the expiration date?

Collapse
Posted by VenuMadhav Deevi on
Hi Peter Marklund,
  I am storing the student details in a table by name user_valid having fields user_id, group_id, start_date, end_date.
  From this http://our_url:portno/index we are getting the email and the password what the student has typed in login page. Once we are able to get these values before these are validated by the openacs subsite page(register/user-login) i putting a TCL file in which i am checking for the date validation .
  If the student is valid i.e. if his end_date > currenttimestamp then these details were redirected to the openacs subsite page(register/user-login) other wise i am stopping him sending a new error page generated by myself.
  In case if the user is not a student i am redirecting to the openacs subsite page (register/user-login).
  I am handling little bit code of openACS. So this is what i have done. Plz tell me whether i can go in a very simple manner than this.
  One more i also want to have extra two more fields for start_date and end_date details when a new user is created using Add User portlate of dotlrn how i can add them.
    So plz help me out as soon as possible
Thanking You.

D.Venu Madhav.