Skip to content

Commit

Permalink
Merge pull request #119 from mikrofusion/master
Browse files Browse the repository at this point in the history
uuid support for reset password
  • Loading branch information
trenpixster authored Jan 31, 2017
2 parents d4abf5d + 67d8199 commit fdc16a7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/addict/interactors/reset_password.ex
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,13 @@ defmodule Addict.Interactors.ResetPassword do

defp parse_token(token) do
[generation_time, user_id] = Base.decode16!(token) |> String.split(",")
{:ok, String.to_integer(generation_time), String.to_integer(user_id)}

id = case is_integer(user_id) do
true -> String.to_integer(user_id)
false -> user_id
end

{:ok, String.to_integer(generation_time), String.to_integer(id)}
end

defp validate_generation_time(generation_time) do
Expand Down

0 comments on commit fdc16a7

Please sign in to comment.