#565318 by snufkin: Changed hook_user() was completely removed.
authorsun
Sat, 26 Sep 2009 23:28:00 +0000 (23:28 +0000)
committersun
Sat, 26 Sep 2009 23:28:00 +0000 (23:28 +0000)
coder_review/includes/coder_review_7x.inc
coder_review/tests/coder_review_7x.test

index ff517db..dc2cf3c 100644 (file)
@@ -1062,9 +1062,10 @@ function _coder_review_7x_user_delete_warning() {
 
 function _coder_review_7x_hook_user_op_warning() {
   return array(
-    '#warning' => t('!hook_user() has been split into a number of smaller hooks.',
+    '#warning' => t('!hook_user() has been removed in favour of hook_user_$op functions, for example !hook_user_validate().',
       array(
-        '!hook_user()' => theme('drupalapi', 'hook_user', '7'),
+        '!hook_user()' => theme('drupalapi', 'hook_user', '6'),
+        '!hook_user_validate()' => theme('drupalapi', 'hook_user_validate', '7'),
       )
     ),
     '#link' => 'http://drupal.org/node/224333#remove_op',
index 50784c9..bbd7cca 100644 (file)
@@ -475,8 +475,7 @@ class CoderReviewUpgrade7xTest extends CoderReviewTestCase {
     $this->assertCoderReviewPass('  function foo_user_delete($edit, $uid)');
 
     // http://drupal.org/node/224333#remove_op
-    $this->assertCoderReviewFail("  function mymodule_user(\$edit, &\$user) {\n  if (\$op == 'load') {\n  }\n}");
-    $this->assertCoderReviewFail("  function mymodule_user(\$edit, &\$user) {\n  switch (\$op) {\n  case 'load':\n  }\n}");
+    $this->assertCoderReviewFail("  function mymodule_user(");
 
     // http://drupal.org/node/224333#logout_path
     $this->assertCoderReviewFail('  drupal_goto(\'logout\');');