Dear community and developers,

I am using the "login one time"-module in my webproject with success. However, each time, when a user creates a new node and the corresponding rule fires (create a new user, send a "login first time"email to the created user), Drupal puts out an error message:

Notice: Undefined index: path in login_one_time_tokens() (Line 890 in mypath/sites/all/modules/login_one_time/login_one_time_module.

Probably relevant for the problem analysis: I am using an inidividual "login first time"-registration page.

What could be the problem?

Thank you in advance!

Drupalissiomo

Comments

davenyss’s picture

have similar issue when using "forgot my password", looked at code statement 890

$replacements[$original] = login_one_time_get_link($account, $data['path']);

the path parameter is optional to "login_one_time_get_link" and is not being set in array $data, yet the code is not allowing for this possibility, resolved it on my website by applying following temporary fix to login_one_time.module

$path = (isset($data['path'])) ? $data['path'] : null;
$replacements[$original] = login_one_time_get_link($account, $path);

Artnetik’s picture

I have the same problem in combination with Commerce, after complete the order.

stewart.adam’s picture

Version: 7.x-2.8 » 7.x-2.x-dev
Status: Active » Needs review
StatusFileSize
new611 bytes

Patch attached based on #1.

dmitrii’s picture

Status: Needs review » Reviewed & tested by the community

works for me

paultrotter50’s picture

Issue summary: View changes

Patch from #3 works for me- thanks stewart.adam

jsibley’s picture

Might this be committed anytime soon? Thanks.

joelpittet’s picture

Category: Support request » Bug report
StatusFileSize
new609 bytes

Leaving this as RTBC, rerolled due to changes.

maedi’s picture

Status: Reviewed & tested by the community » Fixed

Thanks, committed to dev.

  • Maedi committed 65465d7 on 7.x-2.x authored by joelpittet
    Issue #1764134 by stewart.adam, joelpittet: Notice: Undefined index:...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.