We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Tool for bulk import of new users | Forum

Heri Bender
Heri Bender Dec 9 '14
Hi


I am writing a tool for mass import of new users, communicating directly with the DB and the filesystem (FTP), and at the end sending a mail to the new users, everything without relying on the existing oxwall PHP code. 


The tool is very flexible and allows to import avatar pictures, all kinds of custom profile questions, role and group memberships. If you are interested, it is hosted on GitHub (https://github.com/heribender/SocialDataImporter).


I have two problems and hope somebody can give me a hint how to solve them (maybe they are even correlated).


1. I am already able to import all above mentioned things. The new user can log in with the generated password. He can browse other users and view and edit his own profile, but that's all. He isn't allowed to view other members profile nor one of the standard pages. I have entered the same role association in ow_base_authorization_user_role as all other users have. What am I missing that the new users have all the same access rights as the already existing ones?


2. The imported avatar of the new user does not show up, although I uploaded the picture(s) (in the same formats and filename pattern as all other avatar pictures)  to ow_userfiles/plugins/base/avatars/, and made a association in table ow_base_avatar. The new users which have such an avatar assigned do not display anything (only grey square), whereas the new users without avatar display the usual default avatar. This shows me that something goes on behind the scene for users with avatar, but the avatar cannot be loaded at the end. Maybe it is related to the same access right problem described in paragraph 1.


Any help, (also for finishing the tool generally) would be really appreciated.

Heri Bender
Heri Bender Dec 13 '14
Solved the second problem: The uploaded file had wrong access rights. Only the owner could load the file. And because the owner of the file is the user which uploaded the file (which does not match the user under which the oxwall apache runs) the oxwall code could not load the avatar picture. Changing the access right of the file (chmod 644, as the other avatar files) solved the problem. The avatar shows now also in browser.


Also the first problem seems to be solved, but I do not know why. In the meantime the ubuntu server (local VM) hat several reboots. Maybe there was a problem with caches? I dont know.

The Forum post is edited by Heri Bender Dec 13 '14
David
David Nov 14 '15
i am not able to get the avatars displayed .  i havent used the tool but using SQL i have uploaded some profiles in  base_user table and base_avatar  table.

also change the file permission to 666 since 644 was not working and all the other original had 666 permissions.

please let me know if their should be any more changes.

Regards

Heri Bender
Heri Bender Nov 15 '15
This is what I found by reverse engineering a real oxwall database:


       ow_base_avatar           INSERT INTO `ow_base_avatar`(`id`, `userId`, `hash`)               field 'hash'                   e.g. "1396979170" (all have 10 digits)               used for filename in ow_userfiles/plugins/base/avatars:                   - avatar_<userId>_<hash>.jpg (1)                   - avatar_big_<userId>_<hash>.jpg (2)                   - avatar_original_<userId>_<hash>.jpg (3)               where:                   (1) 90x90 pixels, 96 dpi, 24 pixelBits                   (2) 190x190 pixels, 96 dpi, 24 pixelBits                   (3) any size (original uploaded)               Linux-Access-Rights: -rw-r--r--     */


Heri Bender
Heri Bender Nov 15 '15
sry, linebreaks do not show correct. Try again:


        INSERT INTO `ow_base_avatar`(`id`, `userId`, `hash`)
               field 'hash'
                   e.g. "1396979170" (all have 10 digits)
               used for filename in ow_userfiles/plugins/base/avatars:
                   - avatar_<userId>_<hash>.jpg (1)
                   - avatar_big_<userId>_<hash>.jpg (2)
                   - avatar_original_<userId>_<hash>.jpg (3)
               where:
                   (1) 90x90 pixels, 96 dpi, 24 pixelBits
                   (2) 190x190 pixels, 96 dpi, 24 pixelBits
                   (3) any size (original uploaded)
               Linux-Access-Rights: -rw-r--r--


Pete
Pete Nov 19 '15
you could not do a bridge could you for smf forum board ? 
Heri Bender
Heri Bender Nov 19 '15
Pete, I am sorry, but I have no idea what you mean. Please describe more precise!
Abu Road Escort
Abu Road Escort Jul 5 '22
Jodhpur Escorts | < | > | Abu Road Escorts | < | > | Ahor Escorts | < | > | Ajeetpura Escorts | < | > | Ajmer Escorts | < | > | Aklera Escorts | < | > | Alsisar Escorts | < | > | Alwar Escorts | < | > | Amer Escorts | < | > | Amet Escorts | < | > | Antah Escorts | < | > | Anupgarh Escorts | < | > | Arthuna Escorts | < | > | Asind Escorts | < | > | Asnawar Escorts | < | > | Atru Escorts | < | > | Badnor Escorts | < | > | Badopal Escorts | < | > | Bagar Escorts | < | > | Bagru Escorts | < | > | Bajajnagar Escorts | < | > | Bakani Escorts | < | > | Bali Escorts | < | > | Balotra Escorts | < | > | Bandikui Escorts | < | > | Banera Escorts | < | > | Banswara Escorts | < | > | Baran Escorts | < | > | Bari Escorts | < | > | Bari Sadri Escorts | < | > | Barmer Escorts | < | > | Basni Belima Escorts | < | > | Bayana Escorts | < | > | Beawar Escorts | < | > | Bedla Escorts | < | > | Begun Escorts | < | > | Behror Escorts | < | > | Bhadra Escorts | < | > | Bhalariya Escorts | < | > | Bharatpur Escorts | < | > | Bhawani Mandi Escorts | < | > | Bhilwara Escorts | < | > | Bhinder Escorts | < | > | Bhinmal Escorts | < | > | Bhiwadi Escorts | < | > | Bhopalgarh Escorts | < | > | Bhusawar Escorts | < | > | Bhuwana Escorts | < | > | Bidasar Escorts | < | > | Bijapur Escorts | < | > | Bijolia Escorts | < | > | Bikaner Escorts | < | > | Bilara Escorts | < | > | Bissau Escorts | < | > | Borawar Escorts | < | > | Budhpura Escorts | < | > | Buhana Escorts | < | > | Bundi Escorts | < | > | Chaksu Escorts | < | > | Chandwaji Escorts | < | > | Chauru Escorts | < | > | Chavand Escorts | < | > | Chechat Escorts | < | > | Chhabra Escorts | < | > | Chhapar Escorts | < | > | Chhinch Escorts | < | > | Chhipabarod Escorts | < | > | Chirawa Escorts | < | > | Chitari Dungarpur Escorts | < | > | Chittorgarh Escorts | < | > | Chomu Escorts | < | > | Churu Escorts | < | > | Dabani Escorts | < | > | Danta Escorts | < | > | Dantaramgarh Escorts | < | > | Dariba Escorts | < | > | Dausa Escorts | < | > | Deeg Escorts | < | > | Degana Escorts | < | > | Delwara Escorts | < | > | Deogarh Escorts | < | > | Deoli Escorts | < | > | Deshnoke Escorts | < | > | Dhani Brahmnan Escorts | < | > | Dhawa Escorts | < | > | Dholpur Escorts | < | > | Didawata Escorts | < | > | Didwana Escorts | < | > | Dudu Escorts | < | > | Dundlod Escorts | < | > | Dungargarh Escorts | < | > | Dungarpur Escorts | < | > | Falna Escorts | < | > | Farsho Escorts | < | > | Fatehnagar Escorts | < | > | Fatehpur Escorts | < | > | Gajsinghpur Escorts | < | > | Galiakot Escorts | < | > | Gangapur Escorts | < | > | Gogunda Escorts | < | > | Gopalpura Escorts | < | > | Goredi Chancha Escorts | < | > | Gothra Escorts | < | > | Govindgarh Escorts | < | > | Gulabpura Escorts | < | > | Guru Shikhar Escorts | < | > | Hamirgarh Escorts | < | > | Hanumangarh Escorts | < | > | Hindaun Escorts | < | > | Indargarh Escorts | < | > | Jahazpur Escorts | < | > | Jaipur Escorts | < | > | Jaisalmer Escorts | < | > | Jaitaran Escorts | < | > | Jaitpura Escorts | < | > | Jalore Escorts | < | > | Jamwa Ramgarh Escorts | < | > | Jayal Escorts | < | > |