User one time login and password reset I want to implement a functionality such that:
 The user registers on site and is sent an email (validation). Then he is taken to a page where hes is able to click on login form.

This was done using drupal's basic functionality. I had to change the message that was coming upon clicking onetime login page.(/user/reset/#hash)

I did it using hook_form_alter.

But it seems, that the text has been changed for the forgot my password link also.

Is there some way? May be I might have to create a separate page for the forgot password?

Thanks in advance
Try to do the form_alter, only if url has a #hash

if (preg_match('#^user/reset/(.+)#', $_GET['q'], $matches)) {
  //here for new user
}