Drupal offers user management out of the box. This includes new user registration, log in, password mailer and user session management. Drupal stores password as md5 hash value. When a user provides her log in credentials, Drupal generates md5 has values for the password provided and compares it with the one stored in the database against the provided username/email address. This is a well known technique implemented by Unix.
Though Drupal manages the users, we can still alter the behavior of different default actions on a user activity. For example, if you log in from the front page, by default, you will be redirected to front page. Instead we can make to redirect to different page or different front page, that can only be accessed by logged users. To achieve this, we need to use hook_user Drupal hook.
Read moreĀ Drupal hook: hook_user.
