Skip to content

Add user and session methods. #9

Description

@0xWDG
  • Create a user with user.create
    Requires username, password, email

  • Remove a user with user.remove
    2 options:

       1. Send's a email which the user need to confirm (self deleted)
       2. Done by a Administrator (no email)
    
  • Login a user with user.login
    With username or userID or email and correct password
    Gives back a sID (Session ID)

  • Resume with a user account via user.session or session.continue
    Resume with session-token.

    $server->setSessionTime("+1 month"); // 1 month valid session token, 
                                      // (if not renewed automatically)
    
    $server->setBindSessionToIP(false); // bind session to IP-Address.
                                     // [Note] IF TRUE and a user lost wifi
                                     // the session is invalidated!
    
  • Create a custom session with session.create
    If you want to use a custom session ID sID

  • Invalidate a session with session.invalidate user.logout
    If the user logs out.

  • Reset a user password withuser.reset
    Sends a password reset link
    [Admin] Invalidates the user's password, and sends a password reset link.

  • Activate a user withuser.activate
    Activates the user
    [Admin] Activates the user


Administrator only.

  • Invalidate all user sessions with session.admin(istration).invalidateAll
    Only possible for a Administrator

  • Set user login on/off via user.admin(istration).loginEnabled

  • Set user registration on/off via user.admin(istration).registerEnabled

  • change a user status with user.admin(istration).status
    Like permission level (such as admin(istrator), mod(erator), user, activate(d), deactivate(d), ban account)
    Not sure about what next

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions