OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Deleting users

Are you responsible for making OCS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, michael, John

Forum rules
What to do if you have a technical problem with OCS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved. Please note that this FAQ is OJS-centric, but most issues are applicable to both platforms.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OCS Conference Support and Discussion subforum; if you have a development question, try the OCS Development subforum.

Deleting users

Postby m.gori » Thu Dec 20, 2007 7:51 am

Hi everybody,

I have problems with accounts and users management.
Basically, the system does not allow to completely remove users, or so it seems.
The "remove" button in the "all users" page simply takes the specific name off that (general) group.
However, once you click on something like "enroll existing users", the supposed-to-be deleted ones
seem to be still alive, though part of no group or role whatsoever :?
Now, problems arise when, for example, one tries and create a new account whose email is just the same
as somebody that - for a test - I wanted to kill, so to speak, and recreate from scratch.
The "disable" button doesn't help either, for the record.

Does anybody have any kind of hint or suggestion or trick for this matter?

Thanks in advance
Marco
m.gori
 
Posts: 8
Joined: Thu Dec 20, 2007 7:23 am

Re: Deleting users

Postby asmecher » Thu Dec 20, 2007 10:29 am

Hi Marco,

See the thread at http://pkp.sfu.ca/support/forum/viewtopic.php?p=5109#p5109 for some notes on how to delete users. (The thread refers to OJS, but OCS behaves the same way.)

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 9083
Joined: Wed Aug 10, 2005 12:56 pm

Re: Deleting users

Postby m.gori » Fri Dec 21, 2007 2:46 am

Hi Alec,

thanks a lot for your quick reply.
Unfortunately that thread is not useful for my purpose.
The "merge users" tool doesn't seem to launch any sort of merging or deleting process: it simply shows a blank page.
In any case, the action of enrolling a "hidden" user and so let it emerge from the sea of the created-but-not-enrolled accounts
does not seem to help. Yes, the system now allows to "remove" it now from the list of "all users", but sadly the user won't
actually disappear... and could still even be re-enrolled from the "enroll existing user" page.

I then assume that the effective action of erasing a user involves opening the database, finding the record e finally
scratching it out gently with the fingers of the mouse :wink:

Thanks again anyway

with regards
Marco

P.S.
OCS version installed is 2.0.0.0
m.gori
 
Posts: 8
Joined: Thu Dec 20, 2007 7:23 am

Re: Deleting users

Postby asmecher » Fri Dec 21, 2007 11:00 am

Hi Marco,

There's a patch for this at http://pkp.sfu.ca/bugzilla/show_bug.cgi?id=2932, which should solve the Merge Users problem.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 9083
Joined: Wed Aug 10, 2005 12:56 pm

Re: Deleting users

Postby m.giordano » Mon Jan 14, 2008 10:44 am

Hi,

how do I apply above patch? I tried with 'patch -p1 < patch-name.patch' but I'm getting the following response:

can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -u -r1.12 Validation.inc.php
|--- classes/security/Validation.inc.php 15 May 2007 20:31:08 -0000 1.12
|+++ classes/security/Validation.inc.php 28 Jun 2007 17:34:32 -0000
--------------------------
File to patch:

I'm not familiar with patch and diff and I'm certainly doing something silly....
OCS 2.0.0-1 installed on a LAMP box

Many thanks

Marco
m.giordano
 
Posts: 29
Joined: Wed Jan 09, 2008 4:02 am

Re: Deleting users

Postby jmacgreg » Mon Jan 14, 2008 12:42 pm

Hi Marco,

You have to put the patch in the appropriate folder, and run the patch command from that folder. Since this patchfile actually patches 3 separate files, you'll want to move the patch to your ocs root folder (for me it'd be /var/www/ocs/), and run the following command:

Code: Select all
patch -p0 < patchname.patch


Alternatively, you can always take a look at the actual patchfile, and find the lines you need to replace. Every patchfile shows the file name(s) in question, and lines removed (any line with a '-' beside it) and/or added (any line with a '+' beside it), like so:

Code: Select all
diff -u -r1.12 Validation.inc.php
--- classes/security/Validation.inc.php 15 May 2007 20:31:08 -0000      1.12
+++ classes/security/Validation.inc.php 28 Jun 2007 17:34:32 -0000
@@ -331,7 +331,7 @@
         * @param $userId int
         * @return boolean
         */
-       function canAdminister($conferenceId, $schedConfId, $userId) {
+       function canAdminister($conferenceId, $userId) {
 
                if (Validation::isSiteAdmin()) return true;
                if (!Validation::isConferenceManager($conferenceId)) return false;
diff -u -r1.10 PeopleHandler.inc.php


In this example, the file classes/security/Validation.inc.php is being patched; one line is removed, and one added.

Cheers,
James
jmacgreg
 
Posts: 4190
Joined: Tue Feb 14, 2006 10:50 am

Re: Deleting users

Postby jmacgreg » Mon Jan 14, 2008 12:44 pm

Also, you can view further info on the patch command here:

http://linux.die.net/man/1/patch

Cheers,
James
jmacgreg
 
Posts: 4190
Joined: Tue Feb 14, 2006 10:50 am

Re: Deleting users

Postby m.giordano » Wed Jan 16, 2008 2:48 am

Many Thanks, James, as usual, for your support.

I've applied the patch and it seems to work fine, except for the following:
[*] when I run the 'patch' command, after several 'patching file....' lines, I get two lines saying "Patch unexpectedly end in middle of line - Hunk #1 succedeed at 79 with fuzz 1". I checked the content of patch 2932 several times, but it doesn't seem I broke the code at any point...
[*] Once the patch is applied the 'Merge Users' page works fine, but the roles links just above the list of users (Conference Managers, Directors, etc.) don't work and lead to a page with this error:

Notice: Undefined variable: schedConf in /var/www/OCS/pages/manager/PeopleHandler.inc.php on line 522

Fatal error: Call to a member function getSchedConfId() on a non-object in /var/www/OCS/pages/manager/PeopleHandler.inc.php on line 522

Cheers

Marco
m.giordano
 
Posts: 29
Joined: Wed Jan 09, 2008 4:02 am

Re: Deleting users

Postby jmacgreg » Wed Jan 16, 2008 2:00 pm

Hi Marco,

It looks like the patch didn't apply properly -- are you sure you're running OCS 2.0.0-1? Have you made any previous code changes, specifically to the three files listed below?

Take a look at the three files listed in the patch file, and see if or where the patch failed to apply. The three files are:

classes/security/Validation.inc.php
pages/manager/PeopleHandler.inc.php
templates/manager/people/selectMergeUser.tpl

From your error output, I'm guessing the problem, at least at this point, is with PeopleHandler.inc.php. You should be able to compare that files with additions and deletions from the patch file; you can even try editing it yourself.

If you can't see whether the patch applied or not, pm me with the entire contents of that file, and I can take a look.

Cheers,
James
jmacgreg
 
Posts: 4190
Joined: Tue Feb 14, 2006 10:50 am

Re: Deleting users

Postby m.gori » Mon Jan 21, 2008 8:07 am

Hello again,

the above patch has been applied and seems to work as expected - apart from those strange error messages :? here kindly posted by m.giordano - so thanks again.

Nonetheless :oops: allow me to say that the question still remains: wouldn't it be nice if an effective tool to completely and ultimately remove single users was implemented?

Regards
Marco Gori
m.gori
 
Posts: 8
Joined: Thu Dec 20, 2007 7:23 am

Re: Deleting users

Postby asmecher » Thu Jan 24, 2008 11:40 pm

Hi Marco,

Just to make sure the patch failure didn't cause a problem, try downloading version 1.11 of PeopleHandler.inc.php from http://pkp.sfu.ca/cvs/cvsweb.cgi/ocs2/pages/manager/PeopleHandler.inc.php and installing it on your server.

If it's working properly, the Merge Users feature deletes users from the system.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 9083
Joined: Wed Aug 10, 2005 12:56 pm

Re: Deleting users

Postby edithlin » Wed Mar 19, 2008 8:20 pm

Hi all

My PeopleHandler.inc.php is just the same as the version 1.11 but I still got the 'Call to a member function getSchedConfId()' fatal error. Any idea?

Thanks

Edith
edithlin
 
Posts: 35
Joined: Fri Feb 29, 2008 3:05 am

Re: Deleting users

Postby jmacgreg » Thu Mar 20, 2008 11:04 am

Hi Edith,

Did you attempt to apply the whole patch as posted above? It changes two other files as well. If you could detail the steps you've undertaken to apply this patch, I can give further assistance.

Cheers,
James
jmacgreg
 
Posts: 4190
Joined: Tue Feb 14, 2006 10:50 am

Re: Deleting users

Postby edithlin » Tue Mar 25, 2008 11:53 pm

Yes, I applied the whole patch...
Three files were updated.
Please find my files attached.

Again, the error messages show when I select a role on merge users page:
Notice: Undefined variable: schedConf in /srv/www/htdocs/conference/pages/manager/PeopleHandler.inc.php on line 522
Fatal error: Call to a member function getSchedConfId() on a non-object in /srv/www/htdocs/conference/pages/manager/PeopleHandler.inc.php on line 522

Thanks

Edith
Attachments
patch2932.zip
(10.05 KiB) Downloaded 53 times
edithlin
 
Posts: 35
Joined: Fri Feb 29, 2008 3:05 am

Re: Deleting users

Postby tshore » Wed Mar 26, 2008 1:49 am

One issue that has been raised in this thread, but hasn't yet been addressed is:

Why can't we just delete users?
tshore
 
Posts: 264
Joined: Fri Nov 18, 2005 12:48 pm
Location: Hamilton, Ontario

Next

Return to OCS Technical Support

Who is online

Users browsing this forum: Bing [Bot], Yahoo [Bot] and 1 guest