Browse Source

wf:to_list(Mail)

Vladimir Kirillov 11 years ago
parent
commit
2924cac021
1 changed files with 3 additions and 2 deletions
  1. 3 2
      src/github.erl

+ 3 - 2
src/github.erl

@@ -62,8 +62,9 @@ registration_data(Props, github, Ori) ->
 
 
 email_prop(Props, github) ->
 email_prop(Props, github) ->
     Mail = proplists:get_value(<<"email">>, Props),
     Mail = proplists:get_value(<<"email">>, Props),
-    case avz_validator:is_email(Mail) of
-        true -> Mail;
+    L = wf:to_list(Mail),
+    case avz_validator:is_email(L) of
+        true -> L;
         false -> binary_to_list(proplists:get_value(<<"login">>, Props)) ++ "@github"
         false -> binary_to_list(proplists:get_value(<<"login">>, Props)) ++ "@github"
     end.
     end.