Log all username changes?
V I R U S - July 8, 2009 - 10:53
Hi all!
I was looking over the net, but, nothing found.
Is there some plugin or module that logs all username changes? If someone change his username, it should log this changes so that admin or moderator can see from which to which it was changed.
Thanks!

Not sure there is such a module
Hi
I do not know if there is such a module, but do you really want any user to be able to change their user names?
Just in case you DONT, under user permissions, you can disable that ability.
YeaH! =)
Yeah, that was such an idea, cause website will be connected to some gameservers. Otherwise, if i disallow username changing, they will just register few times more, what is not the best experience with some stupid users =))
/* XTreme-CStrike */
Mby is there some plugin
Mby is there some plugin which log all user changes ?
/* XTreme-CStrike */
Ppl, is that really so hard
Ppl, is that really so hard to realise this module?!
/* XTreme-CStrike */
_
No, it's not-- probably 6 lines of code.
_
Don't be a Help Vampire - read and abide the forum guidelines.
If you find my assistance useful, please pay it forward to your fellow drupalers.
If it's not very hard and you
If it's not very hard and you know how to do this plugin, please post it. :)
Sad... Really sad =((( I
Sad... Really sad =((( I really need this plugin...
/* XTreme-CStrike */
_
You might fare a lot better in the forums with a much less entitled attitude. Everyone here is a volunteer-- no one owes you anything, so to see crap like "Ppl, is that really so hard to realise this module?!" is not going to encourage anyone to help you.
_
Don't be a Help Vampire - read and abide the forum guidelines.
If you find my assistance useful, please pay it forward to your fellow drupalers.
Hm... i thought that forums
Hm... i thought that forums are there to get some help or support...
Why the hell is than that board here? To see the post from dumb idiots like "Hello, i'm Peter, how to install drupal on my pc?" ? Right? I think you like such a posts, cause it's not such a difficult job for your brain to answer it, not like the question above...
I saw here a lot of requests, and most of people helped them, by some part of code, with whole solution or just by providing some functions which can help to realise their idea.
But no, there she comes, says that all people are shit and no one owes me something... Have you seen somewhere where i wrote that "I've downloaded drupal, now fu*** help me."?
I've posted just an ordinary help request, and i hope that someone will help me. If you have nothing to say to that topic, what mby help us some way, you don't even need to answer here...
/* XTreme-CStrike */
_
I can't imagine why no one has stepped up to assist you. Thanks for making my point even further.
And I already quoted your inappropriate demand: "Ppl, is that really so hard to realise this module?!" Was that somehow not clear enough?
And no, that's not an 'ordinary help request' by any standard. If you don't know how to ask for help see http://drupal.org/forum-posting or some of the posts from my or VeryMisunderstood's, or nevet's trackers for an idea of the type of requests that actually deserve an answer.
But way to go... blame the community and those, unlike yourself, that actually contribute back, for your unacceptable behavior.
Good luck in open source with that attitude.
_
Don't be a Help Vampire - read and abide the forum guidelines.
If you find my assistance useful, please pay it forward to your fellow drupalers.
Sorry, was just a little bit
Sorry, was just a little bit mad... I've been breaking my brain with that some weeks and cant get it done... =((
/* XTreme-CStrike */
_
Hey it happens-- just try to understand we do the best we can, but the number of people posting far outweighs those replying. So it's a bit of a sore spot with us when people start complaining.
In any case, let's start over. ;-)
Regarding your question-- like I said, it should be about 6 lines of code. I don't know it off the top of my head but I should get a chance to look at it a little later. I'll post back.
_
Don't be a Help Vampire - read and abide the forum guidelines.
If you find my assistance useful, please pay it forward to your fellow drupalers.
_
Ok, this should do it. It will log a watchdog message (admin/reports/dblog) when a user changes their name:
<?phpfunction mymodule_user($op, &$edit, &$account, $category = NULL) {
if ($op == 'update' && array_key_exists('name', $edit) && $edit['name'] != $account->name) {
watchdog('user', t('User changed username from %name.', array('%name' => $account->name)));
}
}
?>
You need to create a custom module (with a .module and .info file) and place that function in the .module file. Be sure to change the 'mymodule' above to whatever you named your module. I always add a "custom.module" to every site for just these kinds of little tweaks.
Four lines of code-- I was close!
_
Don't be a Help Vampire - read and abide the forum guidelines.
If you find my assistance useful, please pay it forward to your fellow drupalers.
Thank you very much!
Thank you very much!
And if i want to save it in standalone table, just to create a query instead of watchdog, right?
/* XTreme-CStrike */
_
yep--- see http://api.drupal.org/api/group/database for some drupal functions to easily interact with the db.
_
Don't be a Help Vampire - read and abide the forum guidelines.
If you find my assistance useful, please pay it forward to your fellow drupalers.
Strange...
Hi! Strange thing... I'm changing my name, but it doesn't log anything in watchdog (dblog)
lognames.info
; $Id: lognames.info,v 1.11 2009/06/08 09:23:51 V I R U S Exp $
name = Log Names
description = Log every username change.
package = Core
version = VERSION
core = 7.x
files[] = lognames.module
lognames.module
<?php
// $Id: lognames.module,v 1.335 2009/08/29 05:46:02 V I R U S Exp $
/**
* @file
* Log every username change..
*/
function lognames_user($op, &$edit, &$account, $category = NULL) {
if ($op == 'update' && array_key_exists('name', $edit) && $edit['name'] != $account->name) {
watchdog('user', t('User changed username from %name.', array('%name' => $account->name)));
}
}
Both of them placed in /sites/all/modules/lognames.
Is there something what i'm doing wrong?
/* XTreme-CStrike */
_
I've done absolutely no development on d7 yet-- there might be api changes that need to be made. You'll have to checkout the upgrade modules guide and/or api.drupal.org.
_
Don't be a Help Vampire - read and abide the forum guidelines.
If you find my assistance useful, please pay it forward to your fellow drupalers.
okay, found the solution. use
okay, found the solution. use hook_user_update =) Just it!
Thanks alot! ))
/* XTreme-CStrike */
_
Excellent.
_
Don't be a Help Vampire - read and abide the forum guidelines.
If you find my assistance useful, please pay it forward to your fellow drupalers.
Anyway thanks to all... Even
Anyway thanks to all... Even so... =((((
/* XTreme-CStrike */