$new_user = array(
'name' => 'Sg',
'mail' => '[email protected]',
'pass' => 'password123',
'status' => 1,
'field_custom_first_name' => array(LANGUAGE_NONE => array(array('value' =>'S'))), // This becomes $account->field_custom_first_name[LANGUAGE_NONE][0]['value']
'field_custom_last_name' => array(LANGUAGE_NONE => array(array('value' => 'Doe'))),
'access' => REQUEST_TIME,
'roles' => array(), // No other roles than Authenticated
//'roles' => array('10' => '10', '11' => '11'), // If you want to specify additional roles, the numbers are role_id's
);
user_save(NULL, $new_user);
I've seen this above code but where should I implement this code? I tried adding it and I got the error:
user_save() is an undefined function.
I just need to be able to login to the system as a super-admin.