Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Project links : https://www.drupal.org/sandbox/laelrukius/2405635 .
NAVER is one of South Korea internet company. (and Their service name.)
This is Drupal 7 module to use NAVER Login Service.
In order to use this, you need to have http://developer.naver.com/ account.
I can give you Test account of http://developer.naver.com/ .
but Tester must know (or use google translator) Korean language. Because Naver Developer page only available for Korean.
Git Clone
git clone --branch 7.x-1.x http://git.drupal.org/sandbox/LaelRukius/2405635.git naver_login
Thanks for testing this code.
Comment | File | Size | Author |
---|---|---|---|
#6 | 스크린샷 2015-01-17 오전 5.40.20.png | 18.37 KB | LaelMoon |
#6 | 스크린샷 2015-01-17 오전 5.40.08.png | 14.81 KB | LaelMoon |
Comments
Comment #1
PA robot CreditAttribution: PA robot commentedProject 1: https://www.drupal.org/node/2407833
Project 2: https://www.drupal.org/node/2405385
As successful completion of the project application process results in the applicant being granted the 'Create Full Projects' permission, there is no need to take multiple applications through the process. Once the first application has been successfully approved, then the applicant can promote other projects without review. Because of this, posting multiple applications is not necessary, and results in additional workload for reviewers ... which in turn results in longer wait times for everyone in the queue. With this in mind, your secondary applications have been marked as 'closed(duplicate)', with only one application left open (chosen at random).
If you prefer that we proceed through this review process with a different application than the one which was left open, then feel free to close the 'open' application as a duplicate, and re-open one of the project applications which had been closed.
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #2
PA robot CreditAttribution: PA robot commentedWe are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then 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 #3
Ayesh CreditAttribution: Ayesh commentedannyeonghaseyo! [[[Just seen that you are from Korea. It's in my bucket list for this year and I absolutely love your country!]]]
Login integration module needs to be written very carefully, so I think this application will need a few more users to review.
Before trying the functionality, here are some best practices checks:
naver_login.admin.inc
- Some string literals use URLs. Consider changing them to use proper t() function modifiers. For example,
t('Visit <a href="@url">there</a> to obtain Naver Login Service key', array('http://example.com'))
- naver_login_callback_uri: This variable will be saved back to the database
naver_login.install
- The hook_enable implementation is not necessary. Drupal takes care to install the schema when installing a module for the first time, and removing it when uninstalling.
- Module creates some variables, which need to be removed in a hook_uninstall() implementation (Not a hook_disable() because in Drupal 7, modules can be disabled without removing its data).
naver_login.module
- Rather than adding a user category and altering its
page callback
, consider introducing a new tab (user/%user/naver_login or a new sub tab user/%user/edit/%naver_login; latter one inherits permissions for user/%user/edit) in your hook_menu implementation.- hook_user_cancel implementation is not necessary because you already have a hook_user_delete(), which is called every time a user is deleted regardless of the cancellation method.
- When deleting the user accounts, unset the data you set in
$user->data
. This will not raise any database errors, but they will remain in the database and memory.naver_login.pages.inc
- Is there are specific reason why you didn't use drupal_goto() in naver_login_auth_request? There is a header() call, which drupal_goto doing.
- I see that you have moved some submit and validate handlers to the .module file. Well, you don have to! When you have the $form_state by reference, call form_load_include to the pages.inc file (even though you call this function from the same page), and Drupal will take care to include those files before executing any submit or validate handlers.
- naver_login_user_settings_form(): Consider using user_access() function to check permissions instead of checking for the administrator role. In "minimal" Drupal installations, there is no "administrator" role. It's an unlocked role so site users have probably changed it.
- It raises a lot of problems if you call drupal_goto() in a form validate or submit handler, because that prevents the rest of the page from being built. If it's a validate handler, you can trigger a validation error. For submit handlers, call
return;
, so the rest of the code block will not be called, but regular form events will run.- naver_login_user_identities(): You can use
drupal_goto()
in the menu router item itself and map arguments accordingly, so there is no need for this function to exist.Overall: A very well written module. I'm setting the status to "needs work" because module leaves some variables and user data in the database after uninstalling and when deleting user accounts. I haven't tested the module myself, but I will reply with a hands-on review later.
Comment #4
LaelMoon CreditAttribution: LaelMoon commentedHello Ayesh!
I will fix it by today.
Thanks!
Comment #5
LaelMoon CreditAttribution: LaelMoon commentedComment #6
LaelMoon CreditAttribution: LaelMoon commentedComment #7
LaelMoon CreditAttribution: LaelMoon commentedComment #8
Ayesh CreditAttribution: Ayesh commentedNice work in the module! I haven't tested the installed module yet, but looking at the code repo, they looks very good IMO.
- I would replace db_select() with db_query() because db_query is faster. db_select would be a better choice if your query is complex, but I didn't see any in your module. This is not a blocker at all though.
Comment #9
AjitSI'm reviewing it now.
Comment #10
LaelMoon CreditAttribution: LaelMoon commentedI'm keep following this.
If you need any sample data or anything, please request.
thanks!
Comment #11
PA robot CreditAttribution: PA robot commentedTimeout when invoking pareview.sh for http://git.drupal.org/sandbox/LaelRukius/2405635.git at http://pareview.sh/pareview/httpgitdrupalorgsandboxLaelRukius2405635git
Do you have any third-party files committed? 3rd party code is not generally allowed on Drupal.org and should be deleted. This policy is described in the getting involved handbook. It also appears in the terms and conditions you agreed to when you signed up for Git access.
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #12
LaelMoon CreditAttribution: LaelMoon commentedThere is no 3rd-party code.
There is no encrypted code.
Even, There is no Loop code. (for, while statement)
Comment #13
issa.haddadin CreditAttribution: issa.haddadin commentedHello,
I just did the automated testing, and i found some small errors in the
naver_login.pages.inc
file:i didn't have the login functionality but i enabled the module, and i think it was written in a good way, but i think it's more recommended as a standards wise to move all your custom function to the
naver_login.pages.inc
file and keep thenaver_login.module
file to drupal hooks.Thank you and good luck.
Comment #14
himmatbhatia CreditAttribution: himmatbhatia as a volunteer commentedHello,
You have missed the hook_help. You should use it hook_help. So that it can be helpful for the new user to know the functionality of this module.
Thanks
Comment #15
nico.knaepen CreditAttribution: nico.knaepen at Logic in Motion for Colruyt Group Services commentedHi,
Using $_GET without sanitizing it first creates the possibility for XSS. Sanitize this first before using it.
'code' => $_GET['code']
I also did some checks on the complexity level of the code. Some files contain almost unreadable code due to the fact that the number of lines per function is too large. In order to have the community in helping you to support this module, try to lower the complexity level of the code.
Some examples:
naver_login.pages.inc
Function naver_login_auth_request contains 35 lines of code.
Function naver_login_auth_retrieve contains 185 lines of code.
Function naver_login_auth_register contains 46 lines of code.
...
Just to give you some insights on how to lower the complexity of your code, I tried this on the function naver_login_auth_retrieve:
Comment #16
apadernoI am changing status basing on the last comments.
Comment #17
apadernoComment #18
PA robot CreditAttribution: PA robot commentedClosing due to lack of activity. If you are still working on this application, you should fix all known problems and then set the status to "Needs review". (See also the project application workflow).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #19
apaderno