Quantcast
Channel: General developer forum
Viewing all articles
Browse latest Browse all 37673

Re: Shopping cart module development

$
0
0
by Mignonne Davis.  

I'm developing something similiar only in Drupal using Ubercart. So far it's working. What I do is as someone goes to pay for their courses in the shopping cart in Drupal, I add a new user directly into mdl_user in the moodle database. Wondering if that's risky? I was going to use the external database as the way to do this, but we already have 4000 moodle users and I don't want to export them all into a separate database. Secondly, I'm having trouble with passwords. I thought I could take the password they put into Drupal ubercart, then concat this with the moodle site's SALT, then run thru MD5 and store in mdl_user. It doesn't seem to work, i.e. the username appears in mdl_user, along with their email and I also fix the mnethostid appropriately and confirm the user. The password is there, but when I try to login as this user in moodle it doesn't work. Does anyone know why you can't drop the password directly into the mdl_user table in moodle if you correctly add the SALT and run it thru md5? The password I save in mdl_user is generated like this: $pass2 = md5($password.$moodlepasswordsalt); Where $password is the password the user entered, and the $moodlepasswordsalt is the random salt string straight from Moodle.


Viewing all articles
Browse latest Browse all 37673

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>