Lowest and highest User ID numbers

12 years 7 months ago - 12 years 7 months ago #178720 by busterocaps
Replied by busterocaps on topic Re: Lowest and highest User ID numbers
Thanks Nick, that did the trick. I think. lol Now the last part.
$cbUser->cb_myfieldname = "test";//this doesn't update the database, apparently and
$cbUser->store();//returns a Call to undefined method CBuser::store() error
So how do I update that field once I've ascertained the value for it?

just looked at your tuts again, and you have an edit user function there
function editUser( $user, $name ) {
	global $_CB_framework, $_CB_database;
 
	$row		=	new moscomprofilerUser( $_CB_database );
 
	if ( $user->id ) {
		$row->load( $user->id );
	}
 
	$row->name	=	$name;
 
	if ( $row->store() ) {
		return true;
	}
 
	return false;
}
This looks like what I want to do, I am assuming. However it seems to be missing the input to the function that passes the data you want edited?
$user in my case is $cbUser and $name would be cb_fieldtoedit. So do I do a
$cbUser->cb_myfieldname = "test";
editUser($cbUser, cb_myfieldname)
?

Thanks!

Please Log in to join the conversation.

12 years 7 months ago - 12 years 7 months ago #178877 by busterocaps
Replied by busterocaps on topic Re: Lowest and highest User ID numbers
I tried using the edit user function, and that doesn't seem to work. So, how do I change the field in the users profile?
UPDATE:

I tried this just a minute ago
$user		=&	$cbUser->getUserData();
       editUser($user, cb_xboxlivestatus);

and it changed every users name to cb_xboxlivestatus. On the plus side, I know I'm in the right church. LOL :woohoo: But it takes forever. I only have 40 users too. I already had to up my max request time to 120 seconds. lol

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.432 seconds

Facebook Twitter LinkedIn