Skip to content

Wrong way to generate user name if AD id is empty #12

@andriyun

Description

@andriyun

During the user import process it's possible that AD id is empty
We can have it in employee_id as activation method mode.
With enabled os2intra_generate_username checkbox (see settings form) the code generate new ad_id in line

$mapped_row['ad_id'] = os2intra_user_import_generate_username($mapped_row);

and pass it to user name afterwards
$fields['name'] = $user['ad_id'];

Users generated in this way also got wrong authorization credentials

} elseif (!empty($user['ad_id'])) {

Proposed solution

For employee_id as activation method mode:

Replace generation of new AD id to drupal user name

For ad_id as activation method mode:

Skip user from import scope with proper log message

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions