![]() * Implements hook_user_cancel_methods_alter(). Cannot log in as Drupal admin Ask Question Asked 5 years, 1 month ago Modified 3 years, 6 months ago Viewed 1k times 0 I have installed phpMyAdmin. Can anyone advise only I've been pulling my hair out on this for over 4 hours Thank you. You can type in the details etc but when you click the login button it just stays on /user and does nothing. Let’s create module called my_module, using following code The issue is that the local site works perfectly as does the live site with the exception that the login does not appear to work. In our case we are defining functionality for our method ‘ my_module_assign_to_admin’ $method: The account cancellation method.$account: The user object on which the operation is being performed.$edit: The array of form values submitted by the user.In this case also following 3 properties can be defined. Depending on the account cancellation method, the module should either do nothing, unpublish content, or anonymize content. These hook will be called on user account cancellations. In our case we are defining new method called ‘ my_module_assign_to_admin’ hook_user_cancel() If #access is defined, the method cannot be configured as default method. access: (optional) A boolean value indicating whether the user can access a method.The description is NOT used for the radio button, but instead should provide additional explanation to the user seeking to cancel their account. ![]() ![]() description: (optional) A description to display on the confirmation form if the user is not allowed to select the account cancellation method.title: The title of method (radio button's title).After we invoke this hook all defined methods are converted as radio button form elements by user_cancel_methods() We can define following 3 properties. This hook is used to modify account cancellation methods and can be used to add, customize, or remove account cancellation methods. Before we start implementing lets discuss about these hooks. There are two user API hooks available to achieve this - hook_user_cancel_methods_alter() & hook_user_cancel(). In this post I am going to explain how to create a create custom method like ‘ Disable the account and make its content belong to the admin user.’ Delete the account and make its content belong to the Anonymous user.Disable the account and unpublish its content.Disable the account and keep its content.PHP Fatal error: Call to undefined function file_directory_path() in /var/on line 211ĭrush command terminated abnormally due to an unrecoverable error.In drupal 7 whenever admin selects to cancel user/s account, it provides multiple cancellation options like Log in or register to post comments Mail me. For Drupal 8 you just need to create file yourautologin.php in the Drupal root directory, put there the next code and open this file in your browser. ALWAYS TEST YOUR BACKUPS ON A NON-PRODUCTION SERVER!Īre you sure you want to perform the restore? (y/n): y Here are few ways to login into your Drupal site not through login form. Restoring will delete some or all of your data and cannot be undone. So I tried drush: drush bam-restore archive scheduled .tar.gz When I reload my site, nothing has changed, so I assume this means failure, although I have no way of knowing what failed or why that I can tell. I get a new page where I choose "Entire Site" to restore to, as that is what I'm backing up, and then click "Restore." That takes me to a white page. I go to Configuration > System > Backup and Migrate > Saved Backups and click on "restore" next to the one I want to restore from. I wanted to do a restore but I'm blocked at every turn it seems. I have a drupal 7.43 installation and it has been doing regular backups using the Backup and Restore module.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |