News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

[BETA] Multiple personas mod

Started by jack, December 03, 2004, 09:19:17 PM

Previous topic - Next topic

jack

I'm working on my forst SMF mod. It's amazing that I posted a load of stuff back in March, and yet have not had time/inclination to actually develop anything till now ::)

Anyways, this mod will allow users to 'become' another user with only two clicks of the mouse. No passwords or hassle etc.
Naturally, it will be up to the admin (or suitably authorised user) what accounts can be used in this way and by whom.
This has been loing on my wish-list, but I only realised a simple way of achieving it earlier this week.

It is of most obvious use fof boards that cater for role-players with online games who prefer users to have an account for each character they use in a game. This is, at least, my primary aim for the mod.
The changeover is only at a single level. That is, if account A can use accounts B and C as personas and account B can use account D as a persona, there is no way for account A to access the resources available to account D.

The version I have working on my board allows all this and seems to work well . The only bad complaints  I've had from my users is the terseness of the interface (the avalable personas list is a quicj hack & slash of the who's online template).

As it is, I still have to implement an interface where then administrator can select what accounts can be used as personas by a specified account. BUt this should not take long (it is a fairly somple dtabase table.

How many people would be interested in this mod? and what extra features would you want?

Amacythe

* Amacythe waves her hand.

I'd love to have a simple way for my members who suffer from CMPD (cyber multiple personality disorder)  to switch from one personna to another.

I do have concerns about security in this matter.

jack

It's quite simple :-

Who can become who is controlled by one DB table. This has two fields with user ID numbers. :-

ID_MEMBER -> ID_PERSONA

Which effectively means : ID_MEMBER can become ID_PERSONA.

My mod interrupts just before most of the user data is loaded (but  and checks iafter the user's password has in the cookie is checked). If a 'persona=' parameter is given on the url (and if it is numeric), a session variable is set.

If the sesion variable exisists, the database is checked to see if the 'login' user is allowed to become the 'persona' user. If so, a few extra variables are set-up so SMF knows who the original user is and '$ID_MEMBER' and '$user_settings' are set to match the persona user.  If these don't match, the persona id number is forgotten about and the software behaves as normal.

The rest of the software only references those two data-structures, so the user has effectively switched accounts.
There is no user interface yet to say that 'user x' can use 'user y' as a persona (I am currently just modifying the db with user id numbers as necessary.
The other problem is that the password checks for admin functions and to change some parts of the profile will request the persona's password and not the original user's password. If you asign admin privileges to a user accessed as a persona, then all bets are off.

If you want to try it, I can provide the mod as it is and instructions on how to mod the database (don't even think about it unless you are comfortable editing PHP and making tar files etc.)

Justyne

would be useful for me as I run a rpg board. We would definitely volunteer to test it.

Ever tried. Ever failed. No matter. Try Again. Fail again. Fail better.

jack

#4
OK, I've done a lot of work on this, and it is live on my current board.

It is obviously in BETA status and has only been tested on SMF 1.0(preview).

Once it is installed, users will see a new 'Persona' button on the menu bar. Clicking on that will give them the list of personas that they are allowed to become. Clicking it while they are using a persona will give the list but with a 'Return to Normal' option.

There is an extra admin option on user's accounts which allows the administrator to manage the list of accounts the user can use as a persona. That should be straight-forward to use.

When using a persona,  if you modify the profile and need the password, you should use the password you originally logged in as. You do not need to know the persona's actual password.

There are two additional permissions, neither of which do much useful :-

* Change persona - shows or hides the menu icon. The actual 'magic' occurs before most of the user's info is loaded, so the permissions system isn't accessible.
* Edit available personas - wether the user can change the list af available personas for an account. WARNING there is nothing then stopping the user from adding an admin account to their list. The permission is set-up as a hook for me to add some extra ideas I'm thinking up, but at the moment, it is useless.

Suggested uses :-

* Allowing users to flip between different accounts with different names etc. (eg. to 'become' characters in a RPG)
* Creation of a forum equivilent of Unix's "su" command. In case you sometimes need privileges, but want to avoid accidentally doing stuff with them.

I would be greatful if someone could give it a spin and let me know what they think.

Ta :)

WolfMan_TC

This was something I was looking for, I didn't realize someone had already been developing one...

Can anyone give me an update for this, because this kind of functionality is just the thing I need!

Thanks in advance for any info!!

WolfMan_TC

jack

Wow .. a response :o

Looks like I'll have to update/check this to support SMF 1.0.3 (my board with this is still running an old version /me slaps wrist)

I'll get you some confirmation sometime during next week.

WolfMan_TC

Cool!  I look forward to hearing from you!!

I was seeking such a thing because the board I'm in partnership in running is a gaming board, and to have the ability to have multiple personas, or characters for want of another name, would be ideal to make things that much better for our users!

I'll anxiously await your response!

WolfMan_TC

jack

I have fixed a minor typo, and it now works against 1.0.3.

I've also added an uninstall option ;)

WolfMan_TC

Cool, great!!

Now, forgive me for being a complete noob, but how do I 'install' this mod to work?

*grins*  Thanks for any and all help!!

WolfMan

jack

#10
DON'T !!

(I've just found a nasty bug ;-[)


Actually, I haven't - just me doing something silly

jack

Goto Admin -> Package Manager.

Then Download new Packages, and use the browse button to upload the tar.gz file.

Then follow the prompts through to completion (note, the screen with lots of 'Success!' lines is not the end screen).

This has only been tested against 1.0.3 (but should work on earlier versions, as it works on the .10 bets releases).

Seta Soujiro


mennou

An Error Has Occurred!
Hacking attempt... 


how can i make it work?

jack

What version of SMF are you using?
What other mods are installed?
Did you get any errors during the mod install?
What were you trying when you got that message?

mennou

I was installed your mod man


--------------------------------------------------------------------------------
PersonaMOD0.9.1.tar.gz

my site work but my profile still  not working..  how can i fix  it? i am using  bet a 1.3
check it for urself  www.mixspot.com/forum2/index.php  username  test pass test click profile u will see the error.




Quote from: jack on August 21, 2005, 07:15:39 AM
What version of SMF are you using?
What other mods are installed?
Did you get any errors during the mod install?
What were you trying when you got that message?

jack

looks like you've tried installing the mod twice. See if you can revert back to the old version of Sources/Profile.php

I haven't tested it yet with SMF 1.1 - looks like it doesn't work 'out of the box' ;)

I will put some work into getting it running on 1.1 this week for you :D

mennou

i did not make no backup... that's my problem now...

[Unknown]

Quote from: jack on August 21, 2005, 02:12:38 PM
looks like you've tried installing the mod twice. See if you can revert back to the old version of Sources/Profile.php

I haven't tested it yet with SMF 1.1 - looks like it doesn't work 'out of the box' ;)

I will put some work into getting it running on 1.1 this week for you :D

1.1 does some query sniffing.  If any of your queries end in ;, have comments in them, or have "SET PASSWORD" in them outside a string, you'll need to change them :P.  The idea is to prevent injections.

-[Unknown]

jack

I don't think that that is the case (I will check things though) - just that the mod has not yet been updated for the changes in files in version 1.1, pacman can't figure out what changes should be made to ModSettings.php and Profile.php.

Advertisement: