Forums | Mahara Community
Manually create accounts without forced password change on first login
06 March 2012, 3:26 AM
Is this possible? I can't see where in the database it sets that a new user has to do this on first login. If it's not a database field value that causes this, how do I trick it to just let the user in with the password we create? And factor in our use of SSO?
12 March 2012, 4:41 PM
The field you are looking for is called 'passwordchange' and is in table 'usr'. If it's 0, the user doesn't have to change the password. Any other value will for the user to change it.
16 March 2012, 4:03 AM
Found the insitutuion tables so that should sort them out for single signon.
Not sure where the salt is generated for manual accounts though, so guessing you can't do that from a SQL query?
16 March 2012, 6:12 AM
I've found the library function that creates users so think it makes sense to use that. But I can't find an example which includes remote users of a pre-setup mahara institution (the users to be created will SSO from moodle into our already present instition - assume institution name testinst for example purposes)/
20 March 2012, 5:19 PM
I'm not really sure what you are looking for :-) SSO users (via MNET) won't have a local password The MNET peer (Moodle in your case) will take care of authentication. Mahara will only talk to the other peer to make sure the user is already authenticated and valid, and authorized to "jump" to Mahara.
 There's a situation when a MNET SSO user can also have a local password: when the institution the user belongs to has 'Internal' authentication as a parent of MNET (XMLRPC) authentication, to let the users log in locally (in addition to "jumping" from the remote peer).
If you want to have a look at what happens when a user "lands" in Mahara from a remote MNET peer, have a look at auth/xmlrpc/land.php (and the files included from there).