Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Search for User Email in usermgr.php  (Read 4034 times)

0 Members and 1 Guest are viewing this topic.

JohannM

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 252
Search for User Email in usermgr.php
« on: December 12, 2015, 07:59:10 pm »

Hi there

Can someone help me perhaps.

How and where can I change the script in usermgr.php to be able to search for a users email address (same as when you would search for Username) ?

Thank you in advance.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Search for User Email in usermgr.php
« Reply #1 on: January 08, 2016, 05:13:48 pm »

Open bridge/udb_base.inc.php, find
Code: [Select]
$options['search'] = 'WHERE u.'.$f['username'].' LIKE "%'.$options['search'].'%" ';and replace with
Code: [Select]
$options['search'] = 'WHERE u.'.$f['username'].' LIKE "%'.$options['search'].'%" OR u.'.$f['email'].' LIKE "%'.$options['search'].'%" ';
Logged

JohannM

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 252
Re: Search for User Email in usermgr.php
« Reply #2 on: January 08, 2016, 06:33:47 pm »

Hi André

Thanx so much. Btw, Happy New Year ....

What would we do without you here ?

Thanx yet again ... ;D
Logged

JohannM

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 252
Re: Search for User Email in usermgr.php
« Reply #3 on: January 09, 2016, 09:51:48 pm »

Hi André

Hope you can help with this one as well please, if you don't mind.

I have fixed my language file.

I have altered my usermgr.php to show only the fileds I needed to see, since I am the only one publishing photos.

I have looked through the file, but were not able to figure out what to do in order to have the "User Email" sorting Ascending or Desending in the
column. I get a critical database error.

Any ideas ?

Thanx in Advance.

JohannM
(www.unp.boy-idols.com)
Logged

JohannM

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 252
Re: Search for User Email in usermgr.php
« Reply #4 on: January 09, 2016, 09:58:53 pm »

André

I figured it out ...

in udb_base.inc.php

find

// Sort codes
        $sort_codes = array('name_a' => 'user_name ASC',

and add after "'lv_d' => 'user_lastvisit DESC',"

'email_a' => 'user_email ASC',
'email_d' => 'user_email DESC',


Thanx anyway

JohannM
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Search for User Email in usermgr.php
« Reply #5 on: January 09, 2016, 10:00:43 pm »

I was just about to reply, glad it works now :)
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 20 queries.