Needs work
Project:
urllogin
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
5 Sep 2012 at 20:45 UTC
Updated:
29 Mar 2016 at 16:41 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
murzSeems that I can use for generate url something like this construction?
But will be better to use function with less parameters.
Comment #2
seandunaway commentedSomething like this instead:
Comment #3
seandunaway commentedI agree this could be more clear in the documentation, 'cause I had to read the entire source of the module to figure it out.
Comment #4
murzBecause my site needs only API for generating those urls and login process, without other additional functional, I create my own lightweight module for those needs: http://drupal.org/sandbox/murz/1779836
Thanks to author of this module for the idea and code examples.
My module have only function for generating login url and callback for processing those urls.
Maybe it will help anything else.
Comment #5
darrellduane commentedHere is a function that works for me :
Comment #6
andrewfn commentedThis looks like a good idea. I'll take a look at incorporating it. Thanks.
Comment #7
darrellduane commentedHere's a patch for the latest commit to add this API function into the code.
It also cleans up some of the documentation.
Comment #8
darrellduane commentedPlease don't use this patch for final inclusion-- you can use it for testing, but I've done a lot more work on this module and incorporated all of my fixes, including the fixes here in the patch
https://www.drupal.org/node/2041029
Comment #9
daluxz commentedI'm not so sure if an API function to create the login URL is very useful.
I think it would be more useful to have an API function which generates only the hash.
Once you know the hash, it's easy to generate a link from that.
Let's say there is a good usecase for generating a login URL as well.
I think the following should happen:
- Could be a one-liner, which might be easier to read:
return url('l/' . urllogin_encode($uid, $codekey, $passphrase) . '/' . $dest, array('absolute' => TRUE));- You might not want to return an absolute URL. You could add an extra parameter to the function, and give it a default value
// Done urllogin_get_login_link"Comment #10
darrellduane commentedGreat points, I'll work on cleaning this up.
Comment #11
jvdkolk commentedAny news on this issue? I would love to use this api :).
Comment #12
W.M. commentedAny news guys?