Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 07-09-2007, 02:01 PM
Muppettt Muppettt is offline
 
Join Date: Jun 2007
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Custom UserCP with password change

Hey,

I'm currently in the middle of creating a custom site that integrates with vB forums (such as single login between the 2, sharing data, pulling threads for a news category etc). So far so good.

Now, i'm trying to create my own UserCP on the custom side with practically all the same main features as the vB ones provides - signature, email & password change etc. I'm now trying to recreate the password change but having difficulties on how to do this.

I assume there must be some file or function already in vB that i could use to do such a thing. I've had a glance around the login.php and the profile.php section for email & password - but not being a very skilled PHP coder i am a bit stumped on where to go.

But yeah, surely the md5 & salt function/section is already in vB somewhere that i could just integrate it with the form? The current password would just hash it and check against the one currently in the password field.. and if they match, then hash the new inputted password and update the table - or is it done differently?

Anyone? There must be a simple way to do this.. i assume its all in profile.php under the editpassword section but i cant change the code to work for me.

Anyone know a simple to to hash a password and check it against the db? Then to do the proper hash sequence and update the user with the new password?
Reply With Quote
  #2  
Old 07-10-2007, 05:10 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Fetch their user from the user table. Then hash passwords like so (you'll find the salt in the user table):
PHP Code:
md5(md5($password) . $salt); 
Reply With Quote
  #3  
Old 07-10-2007, 05:25 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Actually you should be using the javascript file that hashes the password on the client side.
Reply With Quote
  #4  
Old 07-10-2007, 05:46 AM
zahidnextage zahidnextage is offline
 
Join Date: Jul 2007
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

sir i want to help you if you don't mind, i need a option from there we can change status ascending or descending. Please let me know how can i will take this option from admincp?
waiting for your kind reply.
you can chat me by msn messenger with this email id "*** Removed ***"
Reply With Quote
  #5  
Old 07-10-2007, 05:57 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by zahidnextage View Post
sir i want to help you if you don't mind, i need a option from there we can change status ascending or descending. Please let me know how can i will take this option from admincp?
waiting for your kind reply.
you can chat me by msn messenger with this email id "*** Removed ***"
Please open your own thread and do not hijack someone elses unrelated thread.
Reply With Quote
  #6  
Old 07-10-2007, 12:55 PM
Sid Sid is offline
 
Join Date: May 2004
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So the process for this is:

if ( client has javascript ) {
use client-side hashing
} else {
use server-side hasing
}

Is there an implementation of this pre-written in a function, that I could lift?
Reply With Quote
  #7  
Old 07-10-2007, 03:10 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes there are, check any of the standard password change pages or the login page.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:55 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04586 seconds
  • Memory Usage 2,216KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete