This module is for providing an option to the users that the user will be remembered with his Login if he is logged-in from a IP range given by the Site Administers. Only the site administer have the permission to add IP Ranges for the user.
This module have dependency on Remember me Module.
If you enable Remember Me in IP Range Module you won't see Remember me check box in Login page or block.
This module supports various format for IP or IP ranges. Accepted IP Range format are:
- Single IP matches like 123.123.123.123
- Wildcards using an asterisk (*) in any quadrant except the first one, for example 123.123.123.* or 100.*.*.* etc.
- Ranges using a hyphen (-) in any quadrant except the first one, for example 123.123.123.100-200 etc.
- Any number of comma-separated IP addresses or ranges like 10.11.12.13, 123.123.123.100-200, 123.123.124-125.* etc.
Project Page: http://drupal.org/sandbox/behestee/1970404
Git:
git clone --branch 7.x-1.x http://git.drupal.org/sandbox/behestee/1970404.git remember_me_in_ip_range
Comment | File | Size | Author |
---|---|---|---|
remember me in ip range.png | 26.6 KB | behestee |
Comments
Comment #1
PA robot CreditAttribution: PA robot commentedThere are some errors reported by automated review tools, did you already check them? See http://ventral.org/pareview/httpgitdrupalorgsandboxbehestee1970404git
We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and we will take a look at your project right away :-)
Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #2
sreynen CreditAttribution: sreynen commentedComment #3
molenick CreditAttribution: molenick commentedHello, a few quick things I noticed:
1) Change the git link in your original post for non-maintainers. Cloning using the original link asks for your d.o user password.
2) Remove the master branch and add one compatible with Drupal's release conventions. Take a look at this document for additional information: https://drupal.org/node/1015226
3) Remove LICENSE.txt, it will be added automatically by Drupal's packaging system.
4) README.txt could use some additional information about use and configuration. It lists no dependencies which conflicts with the info file: remember_me.
Comment #4
chetan-singhal CreditAttribution: chetan-singhal commentedHi behestee
While taking git clone its asking for password. Please resolve this.
Comment #5
molenick CreditAttribution: molenick commentedHello sreynen,
lines 156-187
Consider replacing your implementation of remember_me_in_ip_range_get_client_ip() with the API call ip_address(). This will give you a client's IP address and account for reverse-proxying, which REMOTE_ADDR may not. Registered Globals are removed in PHP versions above 5.4.0, so it's better looking forward to not rely on them.
Comment #6
molenick CreditAttribution: molenick commentedAh, I forgot to link to the ip_address() documentation: http://api.drupal.org/api/drupal/includes!bootstrap.inc/function/ip_addr...
Comment #7
PA robot CreditAttribution: PA robot commentedClosing due to lack of activity. Feel free to reopen if you are still working on this application.
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #8
behestee CreditAttribution: behestee commentedPassword seeking solved and added new branch. thanks ..
Comment #9
Enxebre CreditAttribution: Enxebre commentedHi,
I think in "function remember_me_in_ip_range_disable()" you could get the same result with a direct call to "db_update()" which would become in a higher performance. You are retrieving and going through absolutly all users of your database unnecessarily.
Regards.
Comment #10
thebruce CreditAttribution: thebruce commentedHi,
There are a couple coding style issues, but not many.
There are a couple of places in the .module file where a new line would be appropriate for the control statement.
i.e.
That's in lines 131,133,135,155.
A small update in comments on line 14:
I agree with Enxebre above that going through all the users in the uninstall might be a little much. I'd look towards entity field query on the user object to generate a list of uids that actually need to be changed:
Here is a good example, although there are many others online -
https://drupal.org/node/916776
One very good walk through from phase2:
http://www.phase2technology.com/blog/entityfieldquery-let-drupal-do-the-...
The data column, where your property gets referenced should be available to the user entity since it is in the base table. I would guess that you'd end up using propertyCondition in your efq to get the remember me value if you end up going this way.
I had a difficult time getting remember me to show up on my login form, though that was completely to do with remember_me and not your module. After some modification it worked and i was able to use, but I wouldn't trust my functional test, which went fine, as a final say.
Thanks for your work, Cheers!
Comment #11
kscheirerThis looks like a very useful module, otherwise would get an RTBC from me.
----
Top Shelf Modules - Crafted, Curated, Contributed.
Comment #12
behestee CreditAttribution: behestee commentedHi kscheirer
I have fixed all the styling issues. please see the link
http://pareview.sh/pareview/httpgitdrupalorgsandboxbehestee1970404git
Master branch has been removed
Updated README.txt as much as I thought necessary. Please let me if you have suggestion.
Removing user data in Disable hook was not much necessary. I had another plan. So now I have removed that.
Deleted all variables of this module explicitly. Removed the code deleting the row from system table. Left this for Drupal.
Remember me check box has been changed to value field.
Thanks for spending time for me to review this project. Please review once again.
Comment #13
behestee CreditAttribution: behestee commentedHi thebruce,
Your solution regarding entity field query seems good one. But I couldn't figure out how to do this query on user data. Please help me to do this if you have some time for me.
Thanks..
Comment #14
kscheirerIt's only major if it's been 2 weeks and no review. See https://drupal.org/node/894256#anchor-workflow.
----
Top Shelf Modules - Crafted, Curated, Contributed.
Comment #15
kscheirerThanks for those updates, looks ready to me.
----
Top Shelf Modules - Crafted, Curated, Contributed.
Comment #15.0
kscheirerUpdated git url
Comment #16
kscheirerIt's been a month without any problems reported, so I'm promoting this myself as per https://drupal.org/node/1125818.
Thanks for your contribution, behestee!
I updated your account to let you promote this to a full project and also create new projects as either a sandbox or a "full" project.
Here are some recommended readings to help with excellent maintainership:
You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and get involved!
Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
Thanks to the dedicated reviewer(s) as well.
----
Top Shelf Modules - Crafted, Curated, Contributed.