Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> General/Other Stuff
Author Message
helsnicht
Hangin' Around



Joined: Jan 25, 2008
Posts: 44

PostPosted: Sun Jun 15, 2008 3:14 pm Reply with quote

I'm tring to allow for people to edit their bio within the MILPACS module. It has a field within the database to assign a nukeusername with a profile. So I'm wondering how to write it so that it checks that the username thats logged into nuke matches that of the milpacs nukeusername and allow for them and only them to edit the bio much like the forum does to allow for editing posts.

Such as if jdoe is logged in and went to his profile within milpacs he would see a link that'll let him edit his bio, but if he went to someone elses profile he wouldn't see the link.

I went into viewtopic.php and looked at the code to allow for editing of posts which is
Code:
if ( ( $userdata['user_id'] == $poster_id && $is_auth['auth_edit'] ) || $is_auth['auth_mod'] )

But I'm not for sure how to convert that over to work with what I'm wanting. Anyone have some insight for me?
 
View user's profile Send private message Visit poster's website
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Wed Jun 18, 2008 6:52 am Reply with quote

Have you checked with the author? Donovan here is the original author of this module.

_________________
Where Do YOU Stand?
HTML Newsletter::ShortLinks::Mailer::Downloads and more... 
View user's profile Send private message Visit poster's website
helsnicht







PostPosted: Fri Jun 20, 2008 3:10 pm Reply with quote

Yes, I'm aware that Donovan is the auther of MILPACS. I know he frequents here quiet often, one reason I posted the question here instead of the 3rdID's site. I figured if I asked a whole group of coders instead of a single person I would have better odds at finding the answer. Though it seems not many people have the time these days to help, so I'll just move on to something else, and jump back to this when I figure out how to do it or someone replies.
 
montego







PostPosted: Sat Jun 21, 2008 6:27 am Reply with quote

helsnicht, its not just "not many people have the time these days to help", which is true to some degree, but its also a factor that MILPACS is not something that I, and others here, are really familiar with. I don't even know how the nukeusername is used. Is this the same as the user_id field in *nuke? I also don't know what other code MILPACS has already to grab the $userinfo within *nuke.

One way to get the logged in user's UserID and name is:

if (is_user($user)) {
cookiedecode($user);
$uid = intval($cookie[0]);
$uname = $cookie[1];
}

Now you have $uid and $uname to work with...
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> General/Other Stuff

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©