Skip to Content Skip to Menu

Lowest and highest User ID numbers

13 years 1 month ago - 13 years 1 month 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.
Code:
$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
Code:
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
Code:
$cbUser->cb_myfieldname = "test"; editUser($cbUser, cb_myfieldname)
?

Thanks!
Last edit: 13 years 1 month ago by busterocaps.

Please Log in or Create an account to join the conversation.

13 years 1 month ago - 13 years 1 month 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
Code:
$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
Last edit: 13 years 1 month ago by busterocaps.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum