Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

[13:22:27 CDT(-0500)] <b-sure> Hello uPortal Devs. is there a place in the database where I can reset a users layout to the default layout? I would need to do this on a mass scale for all of the users. Maybe this could happen by updating a field in the db?

[13:24:20 CDT(-0500)] <EricDalquist> hrm ...

[13:25:00 CDT(-0500)] <EricDalquist> one thing to try if you are on the latest uPortal 4 release

[13:25:09 CDT(-0500)] <b-sure> I'm only looking at this as an option becuase its the last step holding us back from upgrading. and I've been spinning my wheels lately getting the imports to work

[13:25:13 CDT(-0500)] <EricDalquist> create a big .groovy script with one line of:

[13:25:13 CDT(-0500)]

<EricDalquist> portalShellBuildHelper.deleteUser("deluser", '$

Unknown macro: {user}

');

[13:25:13 CDT(-0500)] <EricDalquist> per user

[13:25:21 CDT(-0500)]

<EricDalquist> replace $

Unknown macro: {user}

with their username

[13:25:40 CDT(-0500)] <EricDalquist> then do "ant up-shell -Dscript=path/to/script"

[13:25:49 CDT(-0500)] <EricDalquist> that should run that groovy script and delete all those users

[13:26:04 CDT(-0500)] <EricDalquist> and if layouts are the only bit of interesting data that should work

[13:26:14 CDT(-0500)] <b-sure> oh. so if the user doesn't exist in the db, then they will get recreated and default layout setup?

[13:26:34 CDT(-0500)] <EricDalquist> yup

[13:27:03 CDT(-0500)] <b-sure> is there a reason to not do a "delete from up_user" sql query?

[13:27:12 CDT(-0500)] <b-sure> maybe foreign keys

[13:28:02 CDT(-0500)] <EricDalquist> yeah

[13:28:09 CDT(-0500)] <EricDalquist> that leaves A LOT of crud in other tables

[13:28:51 CDT(-0500)]

<b-sure> ok that makes sense. so for the portalSHellBuildHelper.deleteUser("deluser", '$

Unknown macro: {user}

') ; do I need a list of users to feed to the script?

[13:29:56 CDT(-0500)] <b-sure> it would be nice since some of the successful imports work, but then break on the logged in display, to figure out which ones don't work and just delete those.

[13:31:46 CDT(-0500)] <b-sure> thanks for the tip EricDalquist.

  • No labels